[FFmpeg-devel] [PATCH] avio: fix fourcc if any character is >=0x80.
Baptiste Coudurier
baptiste.coudurier
Fri Mar 4 22:14:04 CET 2011
On 3/4/11 7:50 AM, Ronald S. Bultje wrote:
> Hi,
>
> 2011/3/4 M?ns Rullg?rd <mans at mansr.com>:
>> "Ronald S. Bultje" <rsbultje at gmail.com> writes:
>>
>>> Fixes issue 2638.
>>> ---
>>> libavformat/avio_internal.h | 5 ++++-
>>> 1 files changed, 4 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
>>> index 3b38990..279c7f6 100644
>>> --- a/libavformat/avio_internal.h
>>> +++ b/libavformat/avio_internal.h
>>> @@ -42,6 +42,9 @@ int ffio_read_partial(AVIOContext *s, unsigned char *buf, int size);
>>>
>>> void ffio_fill(AVIOContext *s, int b, int count);
>>>
>>> -#define ffio_wfourcc(pb, str) avio_wl32(pb, MKTAG((str)[0], (str)[1], (str)[2], (str)[3]))
>>> +static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
>>> +{
>>> + avio_wl32(pb, MKTAG(s[0], s[1], s[2], s[3]));
>>> +}
avio_write(pb, s, 4) is faster and better IMHO.
Why not using that ?
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list