From: jstebbins Date: Tue, 19 Oct 2010 17:12:21 +0000 (+0000) Subject: fix zero duration lpcm frame handling X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=a1ac74e6ca8424c31f2b822524aa6a3f5936dc3c;p=handbrake-jp%2Fhandbrake-jp-git.git fix zero duration lpcm frame handling a zero duration frame caused us to send a buffer with zero size which we then interpreted as the end of the stream. git-svn-id: svn://localhost/HandBrake/trunk@3607 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/declpcm.c b/libhb/declpcm.c index 50a5a128..f47fe87b 100644 --- a/libhb/declpcm.c +++ b/libhb/declpcm.c @@ -178,8 +178,13 @@ static int declpcmWork( hb_work_object_t * w, hb_buffer_t ** buf_in, static hb_buffer_t *Decode( hb_work_object_t *w ) { hb_work_private_t *pv = w->private_data; - hb_buffer_t *out = hb_buffer_init( pv->count * sizeof( float ) ); + hb_buffer_t *out; + if (pv->count == 0) + return NULL; + + out = hb_buffer_init( pv->count * sizeof( float ) ); + out->start = pv->next_pts; pv->next_pts += pv->duration; out->stop = pv->next_pts;