1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-12 15:40:50 +02:00

mjpegbdec: dont return a picture when there is no picture.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-09 12:43:51 +01:00
parent 6d1c5ea04a
commit 909a18f73b

View File

@ -136,6 +136,11 @@ read_header:
//XXX FIXME factorize, this looks very similar to the EOI code
if(!s->got_picture) {
av_log(avctx, AV_LOG_WARNING, "no picture\n");
return buf_size;
}
*picture= *s->picture_ptr;
*data_size = sizeof(AVFrame);