From 30f7fb8c69857f09f995542a840fc25362c95547 Mon Sep 17 00:00:00 2001 From: ulion Date: Thu, 8 May 2008 15:55:21 +0000 Subject: Distinguish between ac3 and dts by format tag. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26693 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_hwac3.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libmpcodecs') 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; -- cgit v1.2.3