Opened 6 years ago

Closed 3 years ago

#2512 closed defect (fixed)

FF_API_DESTRUCT_PACKET is incompletely deprecating use of API

Reported by: wolenetz Owned by:
Priority: minor Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:
If FF_API_DESTRUCT_PACKET is not defined, there are currently some pieces that fail to build in FFmpeg.

Currently, FF_API_DESTRUCT_PACKET is gated on lavc major version < 56, so it is defined by default and these build errors are not hit. Until full removal of this deprecated API, users of ffmpeg, such as chromium, that warn on deprecated attribute and error on warnings, currently require downstream patches to disable deprecated attribute while keeping FF_API_DESTRUCT_PACKET defined as true.

Are these build errors known and work planned to fix them prior to full deprecation of this API?

How to reproduce:
Examples of build failures when FF_API_DESTRUCT_PACKET is defined as false (1 < 1) in lavc/version.h:

lavc/avpacket.c:217:5: error: av_destruct_packet(pkt) is called but there is no declaration or definition of it

lavc/utils.c: multiple errors due to use of undeclared member named 'destruct' in 'struct AVPacket'

Change History (6)

comment:1 Changed 6 years ago by cehoyos

  • Cc removed

I am sorry, I don't understand: lavc version is currently 55 and FF_API_DESTRUCT_PACKET is therefore defined (and FFmpeg compilation succeeds).
Are you reporting that we currently cannot bump lavc version to 56 because there is still (at least) one API used that may be removed at the version bump? If yes, this does not sound like a very useful report (we will not bump before this gets fixed) or do I miss something?

comment:2 Changed 6 years ago by heleppkes

Its still useful to know about such missing deprecation checks, i would say.
As you say, obviously it won't be bumped until this is fixed, but if this report can tell us what needs fixing, still worth something, isn't it?

comment:3 Changed 6 years ago by wolenetz

This bug highlights some work needed before version bump and full deprecation of this API. If folks are already aware of it and tracking it somewhere else, that's good news and perhaps this bug is less useful.

comment:4 Changed 6 years ago by cehoyos

  • Priority changed from normal to minor
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:5 Changed 6 years ago by cehoyos

  • Reproduced by developer unset

I actually didn't try to reproduce...

comment:6 Changed 3 years ago by richardpl

  • Resolution set to fixed
  • Status changed from open to closed


Note: See TracTickets for help on using tickets.