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