Showing the changes to libavformat (1 of 1 file). Show all
Unified · Split
| @@ -2748,32 +2748,32 @@ static int mka_parse_audio(MatroskaTrack *track, AVStream *st, · 2747 unmodified lines | ||
| 2748 | 2748 | if (ret) |
| 2749 | 2749 | return ret; |
| 2750 | 2750 | |
| 2751 | − par->codec_type = AVMEDIA_TYPE_AUDIO; | |
| 2752 | − par->sample_rate = track->audio.out_samplerate; | |
| 2753 | − // channel layout may be already set by codec private checks above | |
| 2754 | − if (!av_channel_layout_check(&par->ch_layout)) { | |
| 2755 | − par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; | |
| 2756 | − par->ch_layout.nb_channels = track->audio.channels; | |
| 2757 | − } | |
| 2758 | − if (!par->bits_per_coded_sample) | |
| 2759 | − par->bits_per_coded_sample = track->audio.bitdepth; | |
| 2760 | − if (par->codec_id == AV_CODEC_ID_MP3 || | |
| 2761 | − par->codec_id == AV_CODEC_ID_MLP || | |
| 2762 | − par->codec_id == AV_CODEC_ID_TRUEHD) | |
| 2763 | − sti->need_parsing = AVSTREAM_PARSE_FULL; | |
| 2764 | − else if (par->codec_id != AV_CODEC_ID_AAC) | |
| 2765 | − sti->need_parsing = AVSTREAM_PARSE_HEADERS; | |
| 2766 | − if (track->codec_delay > 0) { | |
| 2767 | − par->initial_padding = av_rescale_q(track->codec_delay, | |
| 2768 | − (AVRational){1, 1000000000}, | |
| 2769 | − (AVRational){1, par->codec_id == AV_CODEC_ID_OPUS ? | |
| 2770 | − 48000 : par->sample_rate}); | |
| 2771 | − } | |
| 2772 | − if (track->seek_preroll > 0) { | |
| 2773 | − par->seek_preroll = av_rescale_q(track->seek_preroll, | |
| 2774 | − (AVRational){1, 1000000000}, | |
| 2775 | − (AVRational){1, par->sample_rate}); | |
| 2776 | − } | |
| 2751 | + par->codec_type = AVMEDIA_TYPE_AUDIO; | |
| 2752 | + par->sample_rate = track->audio.out_samplerate; | |
| 2753 | + // channel layout may be already set by codec private checks above | |
| 2754 | + if (!av_channel_layout_check(&par->ch_layout)) { | |
| 2755 | + par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; | |
| 2756 | + par->ch_layout.nb_channels = track->audio.channels; | |
| 2757 | + } | |
| 2758 | + if (!par->bits_per_coded_sample) | |
| 2759 | + par->bits_per_coded_sample = track->audio.bitdepth; | |
| 2760 | + if (par->codec_id == AV_CODEC_ID_MP3 || | |
| 2761 | + par->codec_id == AV_CODEC_ID_MLP || | |
| 2762 | + par->codec_id == AV_CODEC_ID_TRUEHD) | |
| 2763 | + sti->need_parsing = AVSTREAM_PARSE_FULL; | |
| 2764 | + else if (par->codec_id != AV_CODEC_ID_AAC) | |
| 2765 | + sti->need_parsing = AVSTREAM_PARSE_HEADERS; | |
| 2766 | + if (track->codec_delay > 0) { | |
| 2767 | + par->initial_padding = av_rescale_q(track->codec_delay, | |
| 2768 | + (AVRational){1, 1000000000}, | |
| 2769 | + (AVRational){1, par->codec_id == AV_CODEC_ID_OPUS ? | |
| 2770 | + 48000 : par->sample_rate}); | |
| 2771 | + } | |
| 2772 | + if (track->seek_preroll > 0) { | |
| 2773 | + par->seek_preroll = av_rescale_q(track->seek_preroll, | |
| 2774 | + (AVRational){1, 1000000000}, | |
| 2775 | + (AVRational){1, par->sample_rate}); | |
| 2776 | + } | |
| 2777 | 2777 | |
| 2778 | 2778 | return 0; |
| 2779 | 2779 | } |