summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-08-01 17:14:49 +0000
committerjstebbins <[email protected]>2011-08-01 17:14:49 +0000
commitac3e2eaf6d6deb4ce9b86ce38a3715b3d8968da1 (patch)
treef1fa6a960187f5421f7906191e42d5e025329ea1 /libhb/stream.c
parent1074fcda1a9bc39939c9a2bd3eb346b621b4da19 (diff)
libhb: fix some log spam when scanning h.264 BDs
Some residual data from the previous preview was being sent to the decoder after a seek causing the decoder to complain. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4147 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rw-r--r--libhb/stream.c6
1 files changed, 2 insertions, 4 deletions
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);
}
// ------------------------------------------------------------------