lavf/matroskadec: Set codec_tag also for audio codecs.

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.
pull/166/head
Carl Eugen Hoyos 9 years ago
parent ec11cfdf75
commit 7c1c453ce9
  1. 2
      libavformat/matroskadec.c

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

Loading…
Cancel
Save