[FFmpeg-devel] [PATCH] remove more unused code
Michael Niedermayer
michaelni
Sun May 3 15:34:28 CEST 2009
On Sun, May 03, 2009 at 12:01:20PM +0200, Benjamin Larsson wrote:
> All the dead nested assignments CSA found.
>
> MvH
> Benjamin Larsson
> libavcodec/smc.c | 1 -
> libavcodec/zmbvenc.c | 3 +--
> libavformat/asfdec.c | 2 +-
> libavformat/mpegenc.c | 3 +--
> libavformat/nsvdec.c | 5 ++---
> libavformat/wc3movie.c | 6 +++---
> 6 files changed, 8 insertions(+), 12 deletions(-)
> 76fb7aabed367e9c21aa0dcbd23a174978bc8ede CSA_dead_nested_assignments.diff
[...]
> Index: libavformat/wc3movie.c
> ===================================================================
> --- libavformat/wc3movie.c (revision 18729)
> +++ libavformat/wc3movie.c (working copy)
> @@ -189,7 +189,7 @@
> bytes_to_read = size;
> else
> bytes_to_read = 512;
> - if ((ret = get_buffer(pb, buffer, bytes_to_read)) != bytes_to_read)
> + if (get_buffer(pb, buffer, bytes_to_read) != bytes_to_read)
> return AVERROR(EIO);
> buffer[bytes_to_read] = 0;
> av_metadata_set(&s->metadata, "title", buffer);
> @@ -205,9 +205,9 @@
> /* one of several palettes */
> if ((unsigned)current_palette >= wc3->palette_count)
> return AVERROR_INVALIDDATA;
> - if ((ret = get_buffer(pb,
> + if (get_buffer(pb,
> &wc3->palettes[current_palette * PALETTE_SIZE],
> - PALETTE_SIZE)) != PALETTE_SIZE)
> + PALETTE_SIZE) != PALETTE_SIZE)
> return AVERROR(EIO);
>
> /* transform the current palette in place */
Id guess the return code should rather be passed through
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- 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/20090503/846f1931/attachment.pgp>
More information about the ffmpeg-devel
mailing list