diff options
Diffstat (limited to 'libhb/deca52.c')
-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; |