diff mbox series

[FFmpeg-devel,11/11] avcodec/avcodec: Remove AV_CODEC_FLAG2_DROP_FRAME_TIMECODE

Message ID DB6PR0101MB22140EFA2449028E0A3446688F9A9@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State New
Headers show
Series [FFmpeg-devel,01/11] avcodec/flacdsp: Remove unused function parameter | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 1, 2022, 12:23 p.m. UTC
It has been deprecated in 94d68a41fabb55dd8c7e59b88fe4a28a637d1e5f
and can't be set via AVOptions. The only codecs that use it
(the MPEG-1/2 encoders) have private options for this.
So remove it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/avcodec.h   | 5 -----
 libavcodec/mpeg12enc.c | 1 -
 2 files changed, 6 deletions(-)

Comments

Andreas Rheinhardt Aug. 5, 2022, 1:45 a.m. UTC | #1
Andreas Rheinhardt:
> It has been deprecated in 94d68a41fabb55dd8c7e59b88fe4a28a637d1e5f
> and can't be set via AVOptions. The only codecs that use it
> (the MPEG-1/2 encoders) have private options for this.
> So remove it.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/avcodec.h   | 5 -----
>  libavcodec/mpeg12enc.c | 1 -
>  2 files changed, 6 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index abd6272f63..1d55cdb07a 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -300,11 +300,6 @@ typedef struct RcOverride{
>   */
>  #define AV_CODEC_FLAG2_LOCAL_HEADER   (1 <<  3)
>  
> -/**
> - * timecode is in drop frame format. DEPRECATED!!!!
> - */
> -#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
> -
>  /**
>   * Input bitstream might be truncated at a packet boundaries
>   * instead of only at frame boundaries.
> diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
> index a7e7aef010..ae2311b39f 100644
> --- a/libavcodec/mpeg12enc.c
> +++ b/libavcodec/mpeg12enc.c
> @@ -234,7 +234,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
>          }
>      }
>  
> -    mpeg12->drop_frame_timecode = mpeg12->drop_frame_timecode || !!(avctx->flags2 & AV_CODEC_FLAG2_DROP_FRAME_TIMECODE);
>      if (mpeg12->drop_frame_timecode)
>          mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME;
>      if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) {

Does this one need a version bump? I think so and have therefore not
applied it with the rest of this series.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index abd6272f63..1d55cdb07a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -300,11 +300,6 @@  typedef struct RcOverride{
  */
 #define AV_CODEC_FLAG2_LOCAL_HEADER   (1 <<  3)
 
-/**
- * timecode is in drop frame format. DEPRECATED!!!!
- */
-#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
-
 /**
  * Input bitstream might be truncated at a packet boundaries
  * instead of only at frame boundaries.
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index a7e7aef010..ae2311b39f 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -234,7 +234,6 @@  static av_cold int encode_init(AVCodecContext *avctx)
         }
     }
 
-    mpeg12->drop_frame_timecode = mpeg12->drop_frame_timecode || !!(avctx->flags2 & AV_CODEC_FLAG2_DROP_FRAME_TIMECODE);
     if (mpeg12->drop_frame_timecode)
         mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME;
     if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) {