diff options
author | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-05-08 15:55:21 +0000 |
---|---|---|
committer | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-05-08 15:55:21 +0000 |
commit | 30f7fb8c69857f09f995542a840fc25362c95547 (patch) | |
tree | 40ba6b9b51b9d798f20869ea7a0f9cd6288e718c | |
parent | 2c9139be84806bfaec826914427d3756a8fd2fe3 (diff) | |
download | mpv-30f7fb8c69857f09f995542a840fc25362c95547.tar.bz2 mpv-30f7fb8c69857f09f995542a840fc25362c95547.tar.xz |
Distinguish between ac3 and dts by format tag.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26693 b3059339-0415-0410-9bf9-f77b7e298cf2
-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; |