aboutsummaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorHendrik Leppkes2015-09-29 13:45:23 +0200
committerHendrik Leppkes2015-09-29 13:45:23 +0200
commit4b7685b6c626a159e759a5167af11abef9c7802c (patch)
tree9cec99e8273fcb23d0ec9da7a38d2443a0a779ee /libavformat
parent2f63e83c26f15f5754c87bfbb9f101cd9a2a4b98 (diff)
parentcc8db760616a7ec3bd39b22ca45888c01326db13 (diff)
Merge commit 'cc8db760616a7ec3bd39b22ca45888c01326db13'
* commit 'cc8db760616a7ec3bd39b22ca45888c01326db13': mpegts: use avcodec_get_type() to set codec_type Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegts.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 44d176e91f..9982f1046f 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1543,14 +1543,7 @@ static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section,
st->codec->extradata_size > 0)
st->need_parsing = 0;
- if (st->codec->codec_id <= AV_CODEC_ID_NONE) {
- // do nothing
- } else if (st->codec->codec_id < AV_CODEC_ID_FIRST_AUDIO)
- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- else if (st->codec->codec_id < AV_CODEC_ID_FIRST_SUBTITLE)
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- else if (st->codec->codec_id < AV_CODEC_ID_FIRST_UNKNOWN)
- st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
+ st->codec->codec_type = avcodec_get_type(st->codec->codec_id);
}
}
for (i = 0; i < mp4_descr_count; i++)