Namely to a place after the AVStream has already been created, so that it can be directly attached to it.
Unified · Split
| @@ -2817,7 +2817,6 @@ static int matroska_parse_tracks(AVFormatContext *s) · 2816 unmodified lines | ||
| 2817 | 2817 | MatroskaTrackEncoding *encodings = encodings_list->elem; |
| 2818 | 2818 | AVCodecParameters *par; |
| 2819 | 2819 | int extradata_offset = 0; |
| 2820 | − uint32_t fourcc = 0; | |
| 2821 | 2820 | AVStream *st; |
| 2822 | 2821 | FFStream *sti; |
| 2823 | 2822 | char* key_id_base64 = NULL; |
| @@ -2867,8 +2866,6 @@ static int matroska_parse_tracks(AVFormatContext *s) · 43 unmodified lines | ||
| 2867 | 2866 | track->video.display_width = track->video.pixel_width; |
| 2868 | 2867 | if (track->video.display_height == -1) |
| 2869 | 2868 | track->video.display_height = track->video.pixel_height; |
| 2870 | − if (track->video.color_space.size == 4) | |
| 2871 | − fourcc = AV_RL32(track->video.color_space.data); | |
| 2872 | 2869 | } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) { |
| 2873 | 2870 | if (!track->audio.out_samplerate) |
| 2874 | 2871 | track->audio.out_samplerate = track->audio.samplerate; |
| @@ -2955,7 +2952,6 @@ static int matroska_parse_tracks(AVFormatContext *s) · 80 unmodified lines | ||
| 2955 | 2952 | par = st->codecpar; |
| 2956 | 2953 | |
| 2957 | 2954 | par->codec_id = codec_id; |
| 2958 | − par->codec_tag = fourcc; | |
| 2959 | 2955 | |
| 2960 | 2956 | if (track->flag_default) |
| 2961 | 2957 | st->disposition |= AV_DISPOSITION_DEFAULT; |
| @@ -3003,6 +2999,9 @@ static int matroska_parse_tracks(AVFormatContext *s) · 41 unmodified lines | ||
| 3003 | 2999 | if (ret == SKIP_TRACK) |
| 3004 | 3000 | continue; |
| 3005 | 3001 | } else if (track->type == MATROSKA_TRACK_TYPE_VIDEO) { |
| 3002 | + if (track->video.color_space.size == 4) | |
| 3003 | + par->codec_tag = AV_RL32(track->video.color_space.data); | |
| 3004 | + | |
| 3006 | 3005 | ret = mkv_parse_video_codec(track, par, matroska, |
| 3007 | 3006 | &extradata_offset); |
| 3008 | 3007 | if (ret < 0) |