[FFmpeg-devel] [PATCH] remove a warning from nsvdec.c
Mike Melanson
mike
Mon Jan 28 17:43:03 CET 2008
M?ns Rullg?rd wrote:
> Diego Biurrun <diego at biurrun.de> writes:
>
>> Here is a small patch to replace a #warning with a /* FIXME */ comment.
>> Should be just as good without producing a warning.
>>
>> Diego
>>
>> Index: libavformat/nsvdec.c
>> ===================================================================
>> --- libavformat/nsvdec.c (revision 11635)
>> +++ libavformat/nsvdec.c (working copy)
>> @@ -358,7 +358,7 @@
>> if((unsigned)table_entries >= UINT_MAX / sizeof(uint32_t))
>> return -1;
>> nsv->nsvf_index_data = av_malloc(table_entries * sizeof(uint32_t));
>> -#warning "FIXME: Byteswap buffer as needed"
>> + /* FIXME: Byteswap buffer as needed. */
>> get_buffer(pb, (unsigned char *)nsv->nsvf_index_data, table_entries * sizeof(uint32_t));
>> }
>
> You have a Mac, why don't you fix it properly?
I have a PPC, too. I just looked at this but realized that while the
demuxer makes some motions to load nsvf_index_data, the array is never
actually used, except for in a big DEBUG print statement. This appears
to correspond to the old TOC 1.0 formats which, according to the spec,
"was the original implementation of TOC in NSV, and is very inaccurate.
It is still used as a base for storing the new format, and should be
supported in its old format for old content."
There are some samples in the repository that flex the TOC (like
witchblade-394kbps.nsv).
Perhaps the nsvf_index_data array should be removed?
--
-Mike Melanson
More information about the ffmpeg-devel
mailing list