aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-21 02:02:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-21 03:38:30 +0200
commitb15311eb6f979fa2c14b72db9a05710503e4e6f6 (patch)
tree070bb3a8441175f456920ff6447cd25ae06b0a70
parent98f167202262bd6cce85a1845915023a4b2e2b49 (diff)
downloadffmpeg-b15311eb6f979fa2c14b72db9a05710503e4e6f6.tar.gz
ffmpeg: check avpicture_fill() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 15ff3f3fdfc788c0e4e584badd7ec300abfbd716) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--ffmpeg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index d165eee200..714a45e7e5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1710,7 +1710,11 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (of->ctx->oformat->flags & AVFMT_RAWPICTURE)) {
/* store AVPicture in AVPacket, as expected by the output format */
- avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height);
+ int ret = avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height);
+ if (ret < 0) {
+ av_log(NULL, AV_LOG_FATAL, "avpicture_fill failed\n");
+ exit_program(1);
+ }
opkt.data = (uint8_t *)&pict;
opkt.size = sizeof(AVPicture);
opkt.flags |= AV_PKT_FLAG_KEY;