1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From d8f9797d9c0d45fa9f4402f79c539544b74d2cc7 Mon Sep 17 00:00:00 2001
From: Mladen Milinkovic <maxrd2@smoothware.net>
Date: Fri, 1 Apr 2022 08:35:17 +0200
Subject: [PATCH] VideoPlayer: Fix usage of deprecated/removed AVCodec option
#68
AVCodecContext.refcounted_frames was useful for deprecated API only
(avcodec_decode_video2/avcodec_decode_audio4). The new decode APIs
(avcodec_send_packet/avcodec_receive_frame) always work with reference
counted frames
https://github.com/FFmpeg/FFmpeg/commit/b1cf151c4dfdbd049cd41863b4e0cde927585e17
---
src/videoplayer/backend/streamdemuxer.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
index e8320ea0..7173306f 100644
--- a/src/videoplayer/backend/streamdemuxer.cpp
+++ b/src/videoplayer/backend/streamdemuxer.cpp
@@ -286,8 +286,6 @@ StreamDemuxer::componentOpen(int streamIndex)
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;
}
--
GitLab
|