[FFmpeg-devel] Check return of url_fseek in av_seek_frame_binary
Sean Soria
sean.soria
Sun Dec 6 00:21:48 CET 2009
*ping*
patch was approved but hasn't been checked in yet.
On Wed, Dec 2, 2009 at 4:04 AM, Michael Niedermayer <michaelni at gmx.at>wrote:
> On Tue, Dec 01, 2009 at 06:07:48PM -0800, Sean Soria wrote:
> > Calls to url_fseek should have their return value checked in
> > av_seek_frame_binary, just as they do in av_seek_frame_generic.
> > Otherwise, function may return success even though url_fseek reported
> > failure.
> >
> > --- libavformat/utils.c (revision 20697)
> > +++ libavformat/utils.c (working copy)
> > @@ -1311,6 +1311,7 @@ int av_seek_frame_binary(AVFormatContext *s, int s
> > int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
> > int64_t ts_min, ts_max, ts;
> > int index;
> > + int64_t ret;
> > AVStream *st;
> >
> > if (stream_index < 0)
> > @@ -1363,7 +1364,8 @@ int av_seek_frame_binary(AVFormatContext *s, int s
> > return -1;
> >
> > /* do the seek */
> > - url_fseek(s->pb, pos, SEEK_SET);
> > + if ((ret = url_fseek(s->pb, pos, SEEK_SET)) < 0)
> > + return ret;
> >
> > av_update_cur_dts(s, st, ts);
>
> ok
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Avoid a single point of failure, be that a person or equipment.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFLFlfAYR7HhwQLD6sRAgCOAJ967P/4n8lNyZGQFwIhxTos+cfh8QCgk1Rm
> uJjG7c4VIbWK9Hnt+RzsPlw=
> =U6uu
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list