diff options
author | eddyg <[email protected]> | 2008-10-19 21:43:21 +0000 |
---|---|---|
committer | eddyg <[email protected]> | 2008-10-19 21:43:21 +0000 |
commit | d235fedfc43b5b736806b4e072c11c803c2804ca (patch) | |
tree | 0fc61022e53575d81a857051e13b349cc8ccdda6 | |
parent | 791df0ecad16f41ad3f7acfbfeac97ecb9bf5949 (diff) |
Fix bug which prevented AC3 sync when only one AC3 packet was located in the buffer.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1850 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/deca52.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libhb/deca52.c b/libhb/deca52.c index 26f5603d7..55a3a1ed5 100644 --- a/libhb/deca52.c +++ b/libhb/deca52.c @@ -288,7 +288,8 @@ static hb_buffer_t * Decode( hb_work_object_t * w ) static int deca52BSInfo( hb_work_object_t *w, const hb_buffer_t *b, hb_work_info_t *info ) { - int i, rate, bitrate, flags; + int i; + int rate = 0, bitrate = 0, flags = 0; int old_rate = 0, old_bitrate = 0; memset( info, 0, sizeof(*info) ); @@ -315,7 +316,7 @@ static int deca52BSInfo( hb_work_object_t *w, const hb_buffer_t *b, old_bitrate = bitrate; } } - if ( i >= b->size - 7 ) + if ( rate == 0 || bitrate == 0 ) { /* didn't find AC3 sync */ return 0; |