[FFmpeg-devel] asf.c: fix for "random" ftell() reponse

Ronald S. Bultje rsbultje
Sun Dec 14 20:08:22 CET 2008


for RTSP-MS, each packet has its own ByteIOContext, and thus the
ftell() returned by it is invalid compared to the data read so far
(because it resets to zero at each new ASF packet). This means that
depending on the value of data_offset and packet_size, off can be
negative, which means we never sync on a new ASF packet even if it is
right there in the packet.

The proper thing to do is to check and ensure that off - 3 is never
negative, which the attached patch does.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: asf-fix-for-random-ftell.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081214/1425a175/attachment.asc>

More information about the ffmpeg-devel mailing list