On 09/03/2011 04:52 PM, Anton Khirnov wrote:
> 
> On Sat, 03 Sep 2011 01:24:55 +0200, David Goldwich <[email protected]> 
> wrote:
>>
>> The +7 comes from these lines in the original content decoding code
>>
>>> while (taglen > 1 && q - dst < dstlen - 7) {
>>
>> so it just ignores the last 7 bytes of dst. To be honest, I have no clue
>> why it checks for dstlen-7 here, nor was there any documentation about
>> it. I can't see any reason why it should be like this, but I didn't feel
>> like breaking something, so I adopted my buffers by making them 7 bytes
>> bigger. (The ttag parser uses a constant 512 byte buffer which is way
>> longer than most text tag content, so it's not noticeable there most of
>> the time).
> 
> The answer lies in libavutil/common.h -- PUT_UTF8 macro writes up to 7 bytes.

Ah, thanks for pointing that out, now it's clear.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to