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>
This commit is contained in:
parent
0810608e23
commit
0f87b42b44
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user