[FFmpeg-devel] [PATCH] Avoid reading beyond end of stream in resync function.

Michael Niedermayer michaelni at gmx.at
Mon Aug 12 21:05:01 CEST 2013

On Mon, Aug 12, 2013 at 07:40:32PM +0200, Reimar Döffinger wrote:
> This ends up printing a nonsense warning about
> "marker does not match f_code".
> This happens particularly frequently with VDPAU hwaccel
> since there we fast-forward the stream directly to the end.
> (Note: possibly it is incorrect for us to skip all the way to
> the end for VDPAU, possibly someone should investigate that,
> I am a bit lost in that regard).

its a bit guesswork but
decode_slice() should maybe update s->mb_y in the hwaccel case

(if no better idea exists setting it to mb_height when the bitstream
 end is reached could be tried)

when mb_y is updated then ff_h263_resync() wont be run unless its

the patch could interfere with error concealment beause even if we
are over the end we could have read over a resync marker and there
still might be an intact slice start previously that wasnt decoded

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130812/c78c65f2/attachment.asc>

More information about the ffmpeg-devel mailing list