Commit 1c46e53d authored by Jan Sebechlebsky's avatar Jan Sebechlebsky Committed by Michael Niedermayer

avcodec/mpeg4_unpack_bframes_bsf: Check av_packet_from_data() return value

Signed-off-by: 's avatarJan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8c997b3d
...@@ -126,7 +126,11 @@ static int mpeg4_unpack_bframes_filter(AVBSFContext *ctx, AVPacket *out) ...@@ -126,7 +126,11 @@ static int mpeg4_unpack_bframes_filter(AVBSFContext *ctx, AVPacket *out)
return ret; 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) { if (in->size <= MAX_NVOP_SIZE) {
/* N-VOP */ /* N-VOP */
av_log(ctx, AV_LOG_DEBUG, "Skipping N-VOP.\n"); av_log(ctx, AV_LOG_DEBUG, "Skipping N-VOP.\n");
......
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