Commit 0f87b42b authored by Lazaros Koromilas's avatar Lazaros Koromilas Committed by 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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0810608e
...@@ -517,8 +517,12 @@ int avformat_queue_attached_pictures(AVFormatContext *s) ...@@ -517,8 +517,12 @@ int avformat_queue_attached_pictures(AVFormatContext *s)
if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC && if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC &&
s->streams[i]->discard < AVDISCARD_ALL) { s->streams[i]->discard < AVDISCARD_ALL) {
AVPacket copy = s->streams[i]->attached_pic; AVPacket copy = s->streams[i]->attached_pic;
if (copy.size <= 0) if (copy.size <= 0) {
return AVERROR(EINVAL); 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); copy.buf = av_buffer_ref(copy.buf);
if (!copy.buf) if (!copy.buf)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment