lavf/matroskadec: Set codec_tag also for audio codecs.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 12 Dec 2015 17:21:45 +0000 (18:21 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 12 Dec 2015 17:21:45 +0000 (18:21 +0100)
This was already done for "A_MS/ACM" mkv files and it is done
for mov files but was not done for A_QUICKTIME" mkv files.

libavformat/matroskadec.c

index aad567a..b77e7e8 100644 (file)
@@ -1853,6 +1853,7 @@ static int matroska_parse_tracks(AVFormatContext *s)
             if (ret < 0)
                 return ret;
             codec_id         = st->codec->codec_id;
+            fourcc           = st->codec->codec_tag;
             extradata_offset = FFMIN(track->codec_priv.size, 18);
         } else if (!strcmp(track->codec_id, "A_QUICKTIME")
                    && (track->codec_priv.size >= 86)
@@ -2124,6 +2125,7 @@ static int matroska_parse_tracks(AVFormatContext *s)
             }
         } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
             st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
+            st->codec->codec_tag   = fourcc;
             st->codec->sample_rate = track->audio.out_samplerate;
             st->codec->channels    = track->audio.channels;
             if (!st->codec->bits_per_coded_sample)