comparison ac3_parser.c @ 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 ba5d9a97ab2f
children ee740a4e80c5
comparison
equal deleted inserted replaced
12110:eb5059b0a051 12111:6e15ce7ca0ca
179 hdr_info->channels = hdr.channels; 179 hdr_info->channels = hdr.channels;
180 hdr_info->channel_layout = hdr.channel_layout; 180 hdr_info->channel_layout = hdr.channel_layout;
181 hdr_info->samples = hdr.num_blocks * 256; 181 hdr_info->samples = hdr.num_blocks * 256;
182 if(hdr.bitstream_id>10) 182 if(hdr.bitstream_id>10)
183 hdr_info->codec_id = CODEC_ID_EAC3; 183 hdr_info->codec_id = CODEC_ID_EAC3;
184 else 184 else if (hdr_info->codec_id == CODEC_ID_NONE)
185 hdr_info->codec_id = CODEC_ID_AC3; 185 hdr_info->codec_id = CODEC_ID_AC3;
186 186
187 *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT); 187 *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
188 *new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT); 188 *new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);
189 return hdr.frame_size; 189 return hdr.frame_size;