[FFmpeg-devel] Should add AVProbeData change to API changes + release notes
andreas.cadhalpun at googlemail.com
Fri Sep 12 13:54:36 CEST 2014
On 11.08.2014 22:22, Michael Niedermayer wrote:
> On Mon, Aug 11, 2014 at 08:05:38PM +0200, Reimar Döffinger wrote:
>> (sorry for being too lazy to send a patch)
>> With the major version bump AVProbeData was extended by a new field.
>> This so far has broken 3 places within FFmpeg and one within MPlayer,
>> where AVProbeData was only initialized field-by-field.
>> This will cause "random" crashes.
>> I'm at this point fairly certain a lot of other software will have the
>> same issue.
That's for sure.
>> I suggest we make add a big note with the release that everyone should
>> check their software for uses of AVProbeData that might result in parts
>> of that struct not being initialized.
Please really document this!
It broke mpd  and the mpd developer wasn't happy that this is not
But there is also another problem, as can be seen from the comment in
the fix :
/* this attribute was added in libav/ffmpeg version 11, but
unfortunately it's "uint8_t" instead of "char", and it's
not "const" - wtf? */
I'm also wondering, why AVProbeData.mime_type is a uint8_t* instead of a
This was introduced in commit 3a19405d574a467c68b48e4b824c76617fd59de0
(merged from Libav) and in the same commit lpd.mime_type is used as
argument for av_match_name, which takes const char* ...
And mime_type was added as const char* to AVInputFormat, so this is even
So should this be changed to const char*?
Looking at the commit closer, I just noticed another strange thing:
It introduces AVPROBE_SCORE_MIME, but then still only uses
AVPROBE_SCORE_EXTENSION. I guess this was intended differently.
More information about the ffmpeg-devel