diff mbox series

[FFmpeg-devel,03/15] fftools/ffmpeg, ffplay: Don't set refcounted_frames

Message ID 20210224115341.794293-3-andreas.rheinhardt@gmail.com
State Accepted
Commit cb5a223a7e7e0839c449a0304a5ef17611febf67
Headers show
Series [FFmpeg-devel,01/15] avformat/movenc: Remove always true check | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 24, 2021, 11:53 a.m. UTC
It only affects the old and deprecated avcodec_decode_(video2|audio4)
API which is no longer used here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
I am surprised that no one found this before me. Is it because there was
no -Wdeprecated-declarations warning?

 fftools/ffmpeg.c | 1 -
 fftools/ffplay.c | 2 --
 2 files changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index add5a3e505..abf35150bd 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2957,7 +2957,6 @@  static int init_input_stream(int ist_index, char *error, int error_len)
         ist->dec_ctx->thread_safe_callbacks = 1;
 #endif
 
-        av_opt_set_int(ist->dec_ctx, "refcounted_frames", 1, 0);
         if (ist->dec_ctx->codec_id == AV_CODEC_ID_DVB_SUBTITLE &&
            (ist->decoding_needed & DECODING_FOR_OST)) {
             av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE);
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index b9a30cdb11..ac0885b84e 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -2628,8 +2628,6 @@  static int stream_component_open(VideoState *is, int stream_index)
         av_dict_set(&opts, "threads", "auto", 0);
     if (stream_lowres)
         av_dict_set_int(&opts, "lowres", stream_lowres, 0);
-    if (avctx->codec_type == AVMEDIA_TYPE_VIDEO || avctx->codec_type == AVMEDIA_TYPE_AUDIO)
-        av_dict_set(&opts, "refcounted_frames", "1", 0);
     if ((ret = avcodec_open2(avctx, codec, &opts)) < 0) {
         goto fail;
     }