[FFmpeg-devel] [PATCH] fix the SAMPLE_FMT_NONE case in ffmdec.c

Ronald S. Bultje rsbultje
Tue Mar 16 17:31:56 CET 2010


Hi,

On Tue, Mar 16, 2010 at 12:25 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Tue, Mar 16, 2010 at 12:19:13PM -0400, Ronald S. Bultje wrote:
>> --- libavformat/ffmdec.c ? ? ?(revision 22565)
>> +++ libavformat/ffmdec.c ? ? ?(working copy)
[..]
>> @@ -354,7 +355,7 @@
>> ? ? ? ? ? ? ?codec->sample_rate = get_be32(pb);
>> ? ? ? ? ? ? ?codec->channels = get_le16(pb);
>> ? ? ? ? ? ? ?codec->frame_size = get_le16(pb);
>> - ? ? ? ? ? ?codec->sample_fmt = get_le16(pb);
>> + ? ? ? ? ? ?codec->sample_fmt = sign_extend(get_le16(pb), 16);
>
> a simple cast to int16_t seems simpler

OK, new patch attached again (tested & works).

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100316/3fd2d8d3/attachment.pgp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-ffm-no_sample_fmt.patch
Type: text/x-patch
Size: 503 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100316/3fd2d8d3/attachment.bin>



More information about the ffmpeg-devel mailing list