[FFmpeg-devel] [PATCH] lavf/id3v2: fail read_apic on EOF reading mimetype

Chris Cunningham chcunningham at chromium.org
Fri Dec 14 22:22:44 EET 2018


>
> -char mimetype[64];
> +char mimetype[64] = {0};
>
> would be enough
>

Agree! Next patch.

I'd love to do similar for the isv34 branch, but I'm not sure how to detect
> the condition given the EOF behavior for  avio_get_str:
>  * @return number of bytes read (is always <= maxlen).
>  * If reading ends on EOF or error, the return value will be one more than
>  * bytes actually read.
> How do callers differentiate between cases where you read 5 bytes vs
> reading just 4 bytes and hitting an error - IIIUC both cases return 5.


Anyone familiar with this? Seems like a bad way to signal EOF.


More information about the ffmpeg-devel mailing list