[FFmpeg-devel] [PATCH] Handle mov_read_default() failure
Baptiste Coudurier
baptiste.coudurier
Mon Dec 3 23:23:46 CET 2007
Panagiotis Issaris wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> The attached patch makes the mov demuxer bail out as soon as
> mov_read_default() fails. Currently, the result of mov_read_default()
> seemed to be ignored in two locations.
>
> mov.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> With friendly regards,
> Takis
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHVDRn9kOxLuzz4CkRAjTuAJ9v7Q6qFCTe0RKkPZCxKSnbjrqc5gCeNhgt
> HhPwaAvOFEfeaR6hv4/CvcM=
> =hPfx
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------------
>
> diff -u libavformat/mov.c libavformat/mov.c
> --- libavformat/mov.c (working copy)
> +++ libavformat/mov.c (working copy)
> @@ -505,7 +505,8 @@
> } else
> url_fskip(pb, atom.size);
> } else if (atom.size > 8) { /* to read frma, esds atoms */
> - mov_read_default(c, pb, atom);
> + if (mov_read_default(c, pb, atom) < 0)
> + return -1;
> } else
> url_fskip(pb, atom.size);
> return 0;
> @@ -789,8 +790,10 @@
> }
> /* this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...) */
> a.size = size - (url_ftell(pb) - start_pos);
> - if (a.size > 8)
> - mov_read_default(c, pb, a);
> + if (a.size > 8) {
> + if (mov_read_default(c, pb, a) < 0)
> + return -1;
> + }
> else if (a.size > 0)
> url_fskip(pb, a.size);
> }
>
>
Applied.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel
mailing list