[FFmpeg-cvslog] Do not change codec in flv streams if the user has forced a codec.

Carl Eugen Hoyos git at videolan.org
Fri Feb 1 23:42:46 CET 2013


ffmpeg | branch: release/1.0 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri Feb  1 23:27:15 2013 +0100| [299dc3baeaafa87389002acc5d6a9896fa0159be] | committer: Carl Eugen Hoyos

Do not change codec in flv streams if the user has forced a codec.

Fixes ticket #2218.
(cherry picked from commit 6a50e8a190bc1329fd3e76e8497bb7f870b6e69b)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=299dc3baeaafa87389002acc5d6a9896fa0159be
---

 libavformat/flvdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 8c6807a..d19cf24 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -712,13 +712,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) {



More information about the ffmpeg-cvslog mailing list