diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-05-15 21:19:35 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-05-15 21:19:35 +0300 |
commit | a41db36b22053c2cf103899f3510f68ff5645662 (patch) | |
tree | e2e3d734a828caf8e1fbf1373d818f06c979e53d /libmpcodecs/ad_hwac3.c | |
parent | 267a3f4c9c00848f32c341595d2d831157a79bee (diff) | |
parent | 84fa3d69f360c87fce4efe6acb128ad78d3647e2 (diff) | |
download | mpv-a41db36b22053c2cf103899f3510f68ff5645662.tar.bz2 mpv-a41db36b22053c2cf103899f3510f68ff5645662.tar.xz |
Merge svn changes up to r26783
Conflicts:
Makefile
common.mak
configure
libmpcodecs/vd_ffmpeg.c
libmpdemux/demux_mkv.c
libvo/vo_xv.c
mplayer.c
Diffstat (limited to 'libmpcodecs/ad_hwac3.c')
-rw-r--r-- | libmpcodecs/ad_hwac3.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/libmpcodecs/ad_hwac3.c b/libmpcodecs/ad_hwac3.c index a1e6dd66eb..0c1db05c69 100644 --- a/libmpcodecs/ad_hwac3.c +++ b/libmpcodecs/ad_hwac3.c @@ -61,25 +61,31 @@ static int ac3dts_fillbuff(sh_audio_t *sh_audio) sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++] = c; } - length = dts_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); - if(length >= 12) + if (sh_audio->format == 0x2001) { - if(isdts != 1) + length = dts_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); + if(length >= 12) { - mp_msg(MSGT_DECAUDIO, MSGL_STATUS, "hwac3: switched to DTS, %d bps, %d Hz\n", bit_rate, sample_rate); - isdts = 1; + if(isdts != 1) + { + mp_msg(MSGT_DECAUDIO, MSGL_STATUS, "hwac3: switched to DTS, %d bps, %d Hz\n", bit_rate, sample_rate); + isdts = 1; + } + break; } - break; } - length = a52_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); - if(length >= 7 && length <= 3840) + else { - if(isdts != 0) + length = a52_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); + if(length >= 7 && length <= 3840) { - mp_msg(MSGT_DECAUDIO, MSGL_STATUS, "hwac3: switched to AC3, %d bps, %d Hz\n", bit_rate, sample_rate); - isdts = 0; + if(isdts != 0) + { + mp_msg(MSGT_DECAUDIO, MSGL_STATUS, "hwac3: switched to AC3, %d bps, %d Hz\n", bit_rate, sample_rate); + isdts = 0; + } + break; /* we're done.*/ } - break; /* we're done.*/ } /* bad file => resync*/ memcpy(sh_audio->a_in_buffer, sh_audio->a_in_buffer + 1, 11); |