avformat/swfdec: Do not error out on pixel format changes
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Jul 2015 00:43:02 +0000 (02:43 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 8 Jul 2015 10:54:26 +0000 (12:54 +0200)
Instead print an error and continue

Fixes Ticket4702

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a1204a1a46674084b1e6b92562f81aaab7aac69)

libavformat/swfdec.c

index bf5b581..43a82b8 100644 (file)
@@ -384,10 +384,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
             }
             if (st->codec->pix_fmt != AV_PIX_FMT_NONE && st->codec->pix_fmt != pix_fmt) {
                 av_log(s, AV_LOG_ERROR, "pixel format change unsupported\n");
-                res = AVERROR_PATCHWELCOME;
-                goto bitmap_end;
-            }
-            st->codec->pix_fmt = pix_fmt;
+            }else
+                st->codec->pix_fmt = pix_fmt;
 
             if (linesize * height > pkt->size) {
                 res = AVERROR_INVALIDDATA;