[FFmpeg-devel] Should add AVProbeData change to API changes + release notes
Michael Niedermayer
michaelni at gmx.at
Fri Sep 12 15:18:50 CEST 2014
On Fri, Sep 12, 2014 at 01:54:36PM +0200, Andreas Cadhalpun wrote:
> 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*.
dont ask me
>
> 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*?
i would tend toward a yes.
Though in theory this could lead to software that builds with libav
and doesnt with ffmpeg
for example if someone assigns a array to pd.mime_type and then
writes into that by using pd.mime_type
its really more a question what the community prefers here
100% compatibility or 99% and the more sane type
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140912/0e6059b0/attachment.asc>
More information about the ffmpeg-devel
mailing list