[FFmpeg-devel] [PATCH] error: ensure error codes are signed negative ints.

Michael Niedermayer michaelni at gmx.at
Sun Apr 15 13:43:10 CEST 2012


On Sun, Apr 15, 2012 at 12:55:55PM +0200, Nicolas George wrote:
> Based on a patch by Robert Nagy <ronag89 at gmail.com>.
> 
> It makes a difference when the error code is immediately cast
> into a larger integer, such as an int64_t.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavutil/error.h |   34 ++++++++++++++++++----------------
>  1 files changed, 18 insertions(+), 16 deletions(-)
> 
> 
> Does not break FATE (but colormatrix is currently broken).
> 
> Test case:
> 
> avio_open(&s, "pipe:-", AVIO_FLAG_READ);
> pos = avio_seek(s, 12, SEEK_SET);
> printf("pos = %lx\n", (long)pos);
> 
> and read from "dd if=/dev/urandom bs=6 count=1": without this patch, it
> prints 0xDFB9B0BB.
> 
>

LGTM

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120415/dcc2f811/attachment.asc>


More information about the ffmpeg-devel mailing list