aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJan Sebechlebsky <sebechlebskyjan@gmail.com>2016-07-22 17:59:30 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-07-22 19:04:21 +0200
commit1c46e53dcc685593eaa0d730f263ec95c16a5da8 (patch)
tree8a7724f419c3b3e5ddaec5da1ea033fb1b259364 /libavcodec
parent8c997b3d3d1b60288ef9cd38cf1e709245a9ae64 (diff)
downloadffmpeg-1c46e53dcc685593eaa0d730f263ec95c16a5da8.tar.gz
avcodec/mpeg4_unpack_bframes_bsf: Check av_packet_from_data() return value
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg4_unpack_bframes_bsf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/mpeg4_unpack_bframes_bsf.c b/libavcodec/mpeg4_unpack_bframes_bsf.c
index aee8ccbf62..e227f58ec6 100644
--- a/libavcodec/mpeg4_unpack_bframes_bsf.c
+++ b/libavcodec/mpeg4_unpack_bframes_bsf.c
@@ -126,7 +126,11 @@ static int mpeg4_unpack_bframes_filter(AVBSFContext *ctx, AVPacket *out)
return ret;
}
- av_packet_from_data(out, s->b_frame_buf, s->b_frame_buf_size);
+ ret = av_packet_from_data(out, s->b_frame_buf, s->b_frame_buf_size);
+ if (ret < 0) {
+ av_packet_free(&in);
+ return ret;
+ }
if (in->size <= MAX_NVOP_SIZE) {
/* N-VOP */
av_log(ctx, AV_LOG_DEBUG, "Skipping N-VOP.\n");