diff options
-rw-r--r-- | libmpcodecs/ad_hwac3.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libmpcodecs/ad_hwac3.c b/libmpcodecs/ad_hwac3.c index 34850f2a6a..2ddbc0f450 100644 --- a/libmpcodecs/ad_hwac3.c +++ b/libmpcodecs/ad_hwac3.c @@ -61,6 +61,8 @@ static int ac3dts_fillbuff(sh_audio_t *sh_audio) sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++] = c; } + if (sh_audio->format == 0x2001) + { length = dts_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); if(length >= 12) { @@ -71,6 +73,9 @@ static int ac3dts_fillbuff(sh_audio_t *sh_audio) } break; } + } + else + { length = a52_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); if(length >= 7 && length <= 3840) { @@ -81,6 +86,7 @@ static int ac3dts_fillbuff(sh_audio_t *sh_audio) } break; /* we're done.*/ } + } /* bad file => resync*/ memcpy(sh_audio->a_in_buffer, sh_audio->a_in_buffer + 1, 11); --sh_audio->a_in_buffer_len; |