diff options
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 357627924a..d8f136386a 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); |