[vlc-devel] [PATCH 2/3] Save album art to id3 tag.

Angelo Haller vlc-devel at szanni.org
Tue Jul 31 17:02:31 CEST 2012

On 07/31/2012 04:34 PM, Rémi Denis-Courmont wrote:
> Le mardi 31 juillet 2012 17:22:52 Angelo Haller, vous avez écrit :
>> On 07/31/2012 02:32 PM, Jean-Baptiste Kempf wrote:
>>> On Tue, Jul 31, 2012 at 02:34:03PM +0200, Angelo Haller wrote :
>>>> +    long l_buffer = st.st_size;
>>> Sure that st_size is long and not off_t ?
>>> Best regards,
>> You're right. Fixed version attached.
> It's not that simple. It won't work correctly if the file is Large.
> In fact, I think you should put a fixed sane limit on the file size.
Well I find the behaviour of stat() to be somewhat weird.
If the size is too big, st_size is negative but no error? If
I'm not mistaken it would be positive again, when way too big?

Anyways a fixed sane limit seems to be the way to go.
I'd suggest 10MiB. Suggestions?

More information about the vlc-devel mailing list