[FFmpeg-devel] [patch] mjpeg restart marker parsing

Michael Niedermayer michaelni
Tue Mar 30 11:47:16 CEST 2010


On Mon, Mar 29, 2010 at 10:09:23PM -0700, Tom Harper wrote:
> re:so why do you check against next_restart_marker at all?
>
> If you don't have the next valid restart marker then it is probable that 
> the bitstream is corrupted-   I would imagine they invented this scheme so 
> that you could detect if there was data loss- otherwise why would there be 
> more than one restart marker type?  To be flexible this patch allows the 
> decoding to proceed with the incorrect next marker- which it should do- but 
> it probably means that there will be artifacts in the decoded image.  So in 
> this case I would want ffmpeg to make its best effort but also to tell me 
> that something bad happened, such that I won't blame the decoder for 
> something the encoder did wrong, or that happened in transport.

mjpeg should use ff_er_add_slice() and ff_er_frame_end()
they will recognize missing slices and do the appropriate

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100330/cd37a56b/attachment.pgp>



More information about the ffmpeg-devel mailing list