[Ffmpeg-devel] [PATCH] ffmpeg bug. av_seek_binary() wasnt' checking for divide-by-zero potential
Andy Parkins
andrew.parkins
Wed Dec 6 13:08:39 CET 2006
libavformat/utils.c
* When seeking around near the end of an MPEGTS wrapped MPEG4 stream. I was
getting crashes. I traced it to lavf/utils.c/av_seek_frame_binary(); which
is calling av_rescale() even in situations that will lead to a floating point
error. I think the problem is that I'm seeking very small distances and
there are probably few (or no) keyframes between the two positions (but then
again, I don't entirely understand av_seek_frame_binary() :-))
This patch, checks for the invalid condition (ts_max==ts_min)
and hence allows av_seek_frame_binary() to fall back to a linear search
rather than just crashing.
---
libavformat/utils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 605045189b8a616fd5a57316a6cbaf3741faf2ce.diff
Type: text/x-patch
Size: 521 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061206/de86c508/attachment.bin>
More information about the ffmpeg-devel
mailing list