[FFmpeg-devel] Should add AVProbeData change to API changes + release notes
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Fri Sep 12 13:54:36 CEST 2014
Hi,
On 11.08.2014 22:22, Michael Niedermayer wrote:
> On Mon, Aug 11, 2014 at 08:05:38PM +0200, Reimar Döffinger wrote:
>> Hello,
>> (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.
>
> agree
Please really document this!
It broke mpd [1] and the mpd developer wasn't happy that this is not
documented [2].
But there is also another problem, as can be seen from the comment in
the fix [3]:
/* 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
const char*.
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
inconsistent.
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.
Best regards,
Andreas
1: https://bugs.debian.org/760669
2: https://bugs.debian.org/760669#30
3:
http://git.musicpd.org/cgit/master/mpd.git/diff/?id=219c42522f938c5fff08d962a1a54c0872322f00
More information about the ffmpeg-devel
mailing list