[FFmpeg-devel] [PATCH] mjpegdec: ensure SOF before SOS/EOI
Reimar Döffinger
Reimar.Doeffinger
Wed Jul 1 22:15:22 CEST 2009
Hello,
this fixes issue1240, mjpeg/smclockmjpeg.avi.1.0
The problem is, it reaches EOI before SOF, thus get_buffer was
never called and the picture it returns has invalid values for
data[] (NULL in this case, but it could be values from a previous
frame which still would be wrong).
This could also happen, if avcodec_check_dimensions failed, which
might make this even more of an issue.
Attached patch fixes it and also protects the decode_sos part so
it will only be called with a valid picture.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mjpeg.diff
Type: text/x-diff
Size: 1989 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090701/36188a84/attachment.diff>
More information about the ffmpeg-devel
mailing list