Originally committed as revision 17447 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -72,6 +72,9 @@ get_next: |
| 72 | 72 |
|
| 73 | 73 |
/* update codec info */ |
| 74 | 74 |
avctx->sample_rate = s->sample_rate; |
| 75 |
+ if(s->codec_id) |
|
| 76 |
+ avctx->codec_id = s->codec_id; |
|
| 77 |
+ |
|
| 75 | 78 |
/* allow downmixing to stereo (or mono for AC-3) */ |
| 76 | 79 |
if(avctx->request_channels > 0 && |
| 77 | 80 |
avctx->request_channels < s->channels && |
| ... | ... |
@@ -175,6 +175,10 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, |
| 175 | 175 |
hdr_info->bit_rate = hdr.bit_rate; |
| 176 | 176 |
hdr_info->channels = hdr.channels; |
| 177 | 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 | 183 |
*need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT); |
| 180 | 184 |
*new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT); |