[FFmpeg-devel] [PATCH] rmdec.c: use get_buffer and skip_bytes instead of loops of get_byte
Michael Niedermayer
michaelni
Sun Dec 14 20:28:25 CET 2008
On Sun, Dec 14, 2008 at 01:45:20PM -0500, Ronald S. Bultje wrote:
> Hi,
>
> $subj. It also does gets rid of some stupid variables.
[...]
> @@ -149,13 +143,12 @@
>
> rm->audiobuf = av_malloc(rm->audio_framesize * sub_packet_h);
> } else if ((!strcmp(buf, "cook")) || (!strcmp(buf, "atrc")) || (!strcmp(buf, "sipr"))) {
> - int codecdata_length, i;
> get_be16(pb); get_byte(pb);
> if (((version >> 16) & 0xff) == 5)
> get_byte(pb);
> - codecdata_length = get_be32(pb);
> - if(codecdata_length + FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)codecdata_length){
> - av_log(s, AV_LOG_ERROR, "codecdata_length too large\n");
> + st->codec->extradata_size = get_be32(pb);
> + if(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)st->codec->extradata_size){
> + av_log(s, AV_LOG_ERROR, "extradata_size too large\n");
> return -1;
> }
>
what is the point of this change?
have you proofen that extradata_size is not used after this
and fully documented that it is invalid?
i think this and similar hunks are not worth the work and definitly
dont belong in a patch of more or less cosmetic changes
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- 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/20081214/5d29c917/attachment.pgp>
More information about the ffmpeg-devel
mailing list