mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mjpeg2jpeg_bsf: Check ff_bsf_get_packet success
This fixes ticket #5487 - mjpeg2jpeg bitstream filter causes segmentation fault with header-less mjpeg. Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1fee770a1c
commit
0ff3489534
|
@ -86,6 +86,8 @@ static int mjpeg2jpeg_filter(AVBSFContext *ctx, AVPacket *out)
|
|||
uint8_t *output;
|
||||
|
||||
ret = ff_bsf_get_packet(ctx, &in);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (in->size < 12) {
|
||||
av_log(ctx, AV_LOG_ERROR, "input is truncated\n");
|
||||
|
|
Loading…
Reference in New Issue