comparison ac3_parser.c @ 8977:82ab0b77695b libavcodec

Allow AC-3 parser to modify codec_id. Patch by Joakim Plate (elupus A ecce D se).
author jbr
date Thu, 19 Feb 2009 00:28:19 +0000
parents 04423b2f6e0b
children 5a3426d7d053
comparison
equal deleted inserted replaced
8976:e7d87561b42b 8977:82ab0b77695b
173 173
174 hdr_info->sample_rate = hdr.sample_rate; 174 hdr_info->sample_rate = hdr.sample_rate;
175 hdr_info->bit_rate = hdr.bit_rate; 175 hdr_info->bit_rate = hdr.bit_rate;
176 hdr_info->channels = hdr.channels; 176 hdr_info->channels = hdr.channels;
177 hdr_info->samples = AC3_FRAME_SIZE; 177 hdr_info->samples = AC3_FRAME_SIZE;
178 if(hdr.bitstream_id>10)
179 hdr_info->codec_id = CODEC_ID_EAC3;
180 else
181 hdr_info->codec_id = CODEC_ID_AC3;
178 182
179 *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT); 183 *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
180 *new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT); 184 *new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);
181 return hdr.frame_size; 185 return hdr.frame_size;
182 } 186 }