summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/bd.c1
-rw-r--r--libhb/internal.h1
-rw-r--r--libhb/stream.c6
3 files changed, 4 insertions, 4 deletions
diff --git a/libhb/bd.c b/libhb/bd.c
index 4eb9fceb6..d61e5217a 100644
--- a/libhb/bd.c
+++ b/libhb/bd.c
@@ -520,6 +520,7 @@ int hb_bd_seek( hb_bd_t * d, float f )
bd_seek(d->bd, packet * 192);
d->next_chap = bd_get_current_chapter( d->bd ) + 1;
+ hb_ts_stream_reset(d->stream);
return 1;
}
diff --git a/libhb/internal.h b/libhb/internal.h
index 724ab7c2e..c4b30ee4a 100644
--- a/libhb/internal.h
+++ b/libhb/internal.h
@@ -255,6 +255,7 @@ void hb_bd_set_angle( hb_bd_t * d, int angle );
int hb_bd_main_feature( hb_bd_t * d, hb_list_t * list_title );
hb_stream_t * hb_bd_stream_open( hb_title_t *title );
+void hb_ts_stream_reset(hb_stream_t *stream);
hb_stream_t * hb_stream_open( char * path, hb_title_t *title, int scan );
void hb_stream_close( hb_stream_t ** );
hb_title_t * hb_stream_title_scan( hb_stream_t *, hb_title_t *);
diff --git a/libhb/stream.c b/libhb/stream.c
index 84d6c1a63..a95ce532c 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -206,7 +206,6 @@ static void hb_stream_duration(hb_stream_t *stream, hb_title_t *inTitle);
static void hb_ts_stream_init(hb_stream_t *stream);
static void hb_ts_stream_find_pids(hb_stream_t *stream);
static hb_buffer_t * hb_ts_stream_decode(hb_stream_t *stream);
-static void hb_ts_stream_reset(hb_stream_t *stream);
static void hb_ts_stream_set_audio_list(hb_list_t *list_audio, hb_stream_t *stream);
static void hb_ps_stream_find_audio_ids(hb_stream_t *stream, hb_title_t *title);
static off_t align_to_next_packet(hb_stream_t *stream);
@@ -1579,6 +1578,7 @@ int hb_stream_seek( hb_stream_t * stream, float f )
// We need to drop the current decoder output and move
// forwards to the next transport stream packet.
hb_ts_stream_reset(stream);
+ align_to_next_packet(stream);
if ( f > 0 )
{
if ( stream->ts_IDRs )
@@ -3054,7 +3054,7 @@ static hb_buffer_t * hb_ts_stream_decode( hb_stream_t *stream )
return NULL;
}
-static void hb_ts_stream_reset(hb_stream_t *stream)
+void hb_ts_stream_reset(hb_stream_t *stream)
{
int i;
@@ -3080,8 +3080,6 @@ static void hb_ts_stream_reset(hb_stream_t *stream)
stream->errors = 0;
stream->last_error_frame = -10000;
stream->last_error_count = 0;
-
- align_to_next_packet(stream);
}
// ------------------------------------------------------------------