changeset 12111:6e15ce7ca0ca libavcodec

ac3: make the value of codec_id during (E-)AC-3 parsing stay CODEC_ID_EAC3 if any E-AC-3 frames have been detected instead of switching back and forth for AC-3 core + dependent E-AC-3 substream(s). Fixes Issue 2022.
author jbr
date Wed, 07 Jul 2010 23:52:24 +0000
parents eb5059b0a051
children 3c5a6cc5a652
files ac3_parser.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ac3_parser.c	Wed Jul 07 21:50:50 2010 +0000
+++ b/ac3_parser.c	Wed Jul 07 23:52:24 2010 +0000
@@ -181,7 +181,7 @@
     hdr_info->samples = hdr.num_blocks * 256;
     if(hdr.bitstream_id>10)
         hdr_info->codec_id = CODEC_ID_EAC3;
-    else
+    else if (hdr_info->codec_id == CODEC_ID_NONE)
         hdr_info->codec_id = CODEC_ID_AC3;
 
     *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);