[FFmpeg-cvslog] avcodec/mpeg4_unpack_bframes_bsf: Check av_packet_from_data() return value
Jan Sebechlebsky
git at videolan.org
Fri Jul 22 20:14:14 EEST 2016
ffmpeg | branch: master | Jan Sebechlebsky <sebechlebskyjan at gmail.com> | Fri Jul 22 17:59:30 2016 +0200| [1c46e53dcc685593eaa0d730f263ec95c16a5da8] | committer: Michael Niedermayer
avcodec/mpeg4_unpack_bframes_bsf: Check av_packet_from_data() return value
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c46e53dcc685593eaa0d730f263ec95c16a5da8
---
libavcodec/mpeg4_unpack_bframes_bsf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpeg4_unpack_bframes_bsf.c b/libavcodec/mpeg4_unpack_bframes_bsf.c
index aee8ccb..e227f58 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");
More information about the ffmpeg-cvslog
mailing list