[FFmpeg-devel] Patch in seek error handling in libavformat/utils.c
Michael Niedermayer
michaelni
Sun Sep 28 14:34:25 CEST 2008
On Fri, Sep 26, 2008 at 02:41:22PM +0800, liuhaixiang wrote:
> Hi All,
>
> I discard outlook and send again. Hope new mail system fix my post issue.
>
> Please have a look at my patch.
> This is to fix the error handling missing during seek. I found when I tried to seek corrupted stream with ffmpeg.
> The explanation on my patch has already been commented in the patch.
>
> Best regards
> Hai-xiang Liu
>
>
>
>
> --- libavformat/utils.c.org 2008-09-11 19:22:54.000000000 +0800
> +++ libavformat/utils.c 2008-09-26 11:54:28.826673568 +0800
> @@ -1338,6 +1338,10 @@
>
> index= av_index_search_timestamp(st, target_ts, flags | AVSEEK_FLAG_BACKWARD); //FIXME whole func must be checked for non-keyframe entries in index case, especially read_timestamp()
> index= FFMAX(index, 0);
> + // check index not exceed the number of index entry
> + if (index >= st->nb_index_entries)
> + return -1;
> +
> e= &st->index_entries[index];
trailing whitespace, tabs and the check makes no sense, i do not see how
it could be true at all.
Besides we would before any patch need a full and reproduceable bugreport.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- 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/20080928/13946c7d/attachment.pgp>
More information about the ffmpeg-devel
mailing list