[FFmpeg-cvslog] libavformat/utils: Warning about invalid cover art instead of an error

Lazaros Koromilas git at videolan.org
Wed May 28 19:28:52 CEST 2014


ffmpeg | branch: master | Lazaros Koromilas <lostd at 2f30.org> | Wed May 28 16:31:03 2014 +0300| [0f87b42b44f8da7234e8e43b27d1dc5e4dce7582] | committer: Michael Niedermayer

libavformat/utils: Warning about invalid cover art instead of an error

This way other streams can still be used with the -map option.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/utils.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3576279..d8f1363 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -517,8 +517,12 @@ int avformat_queue_attached_pictures(AVFormatContext *s)
         if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC &&
             s->streams[i]->discard < AVDISCARD_ALL) {
             AVPacket copy = s->streams[i]->attached_pic;
-            if (copy.size <= 0)
-                return AVERROR(EINVAL);
+            if (copy.size <= 0) {
+                av_log(s, AV_LOG_WARNING,
+                    "Attached picture on stream %d has invalid size, "
+                    "ignoring\n", i);
+                continue;
+            }
             copy.buf = av_buffer_ref(copy.buf);
             if (!copy.buf)
                 return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list