lavc: deprecate AV_CODEC_FLAG_DROPCHANGED

This decoding flag makes decoders drop all frames after a parameter
change, but what exactly constitutes a parameter change is not well
defined and will typically depend on the exact use case.
This functionality then does not belong in libavcodec, but rather in
user code
This commit is contained in:
Anton Khirnov 2023-07-09 14:53:46 +02:00
parent 9557bf26b3
commit f264204de9
7 changed files with 24 additions and 6 deletions

View file

@ -226,11 +226,15 @@ typedef struct RcOverride{
* Use qpel MC.
*/
#define AV_CODEC_FLAG_QPEL (1 << 4)
#if FF_API_DROPCHANGED
/**
* Don't output frames whose parameters differ from first
* decoded frame in stream.
*
* @deprecated callers should implement this functionality in their own code
*/
#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
#endif
/**
* Request the encoder to output reconstructed frames, i.e.\ frames that would
* be produced by decoding the encoded bistream. These frames may be retrieved
@ -2713,9 +2717,6 @@ int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);
* no more output frames
* @retval AVERROR(EINVAL) codec not opened, or it is an encoder without the
* @ref AV_CODEC_FLAG_RECON_FRAME flag enabled
* @retval AVERROR_INPUT_CHANGED current decoded frame has changed parameters with
* respect to first decoded frame. Applicable when flag
* AV_CODEC_FLAG_DROPCHANGED is set.
* @retval "other negative error code" legitimate decoding errors
*/
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);