aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-02-01 23:27:15 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-02-01 23:37:48 +0100
commit3445bec6fc1de92a6ebef1ada2e5aa850fde9e94 (patch)
tree8a8f12ab7ce66157eee26f2d4f7e0ac373fa7b49
parentc8dace272829365905d67f6f2bf76668135472d5 (diff)
downloadffmpeg-3445bec6fc1de92a6ebef1ada2e5aa850fde9e94.tar.gz
Do not change codec in flv streams if the user has forced a codec.
Fixes ticket #2218. (cherry picked from commit 6a50e8a190bc1329fd3e76e8497bb7f870b6e69b)
-rw-r--r--libavformat/flvdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 09a77c4852..b57929eda1 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -713,13 +713,13 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
st = s->streams[i];
if (stream_type == FLV_STREAM_TYPE_AUDIO) {
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
- flv_same_audio_codec(st->codec, flags)) {
+ (s->audio_codec_id || flv_same_audio_codec(st->codec, flags))) {
break;
}
} else
if (stream_type == FLV_STREAM_TYPE_VIDEO) {
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
- flv_same_video_codec(st->codec, flags)) {
+ (s->video_codec_id || flv_same_video_codec(st->codec, flags))) {
break;
}
} else if (stream_type == FLV_STREAM_TYPE_DATA) {