summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorLazaros Koromilas <lostd@2f30.org>2014-05-28 16:31:03 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-05-28 19:12:02 +0200
commit0f87b42b44f8da7234e8e43b27d1dc5e4dce7582 (patch)
tree7ee1c712fe4d4238a7a5907cc9554db313980c68 /libavformat
parent0810608e23456eeff75b691c7c444762352ec196 (diff)
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@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c8
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);