From dffa312b2e332d493b91ee6332cdfe8d2fae30e1 Mon Sep 17 00:00:00 2001
From: philippegorley <philippe.gorley@savoirfairelinux.com>
Date: Tue, 7 Nov 2017 13:58:37 -0500
Subject: [PATCH] media: don't set AVCodecContext->refcounted_frames

This attribute was useful with the old decoding API. Refcounted frames
are always used with the avcodec_send_packet/avcodec_receive_frame API.

Change-Id: I0904ed8731c329e0f8f3d59d1872bff6a26543be
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
---
 src/media/media_decoder.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/media/media_decoder.cpp b/src/media/media_decoder.cpp
index a6a865ac22..18f146bb9d 100644
--- a/src/media/media_decoder.cpp
+++ b/src/media/media_decoder.cpp
@@ -219,7 +219,6 @@ int MediaDecoder::setupFromAudioData(const AudioFormat format)
         startTime_ = av_gettime();
     }
 
-    decoderCtx_->refcounted_frames = 1;
     ret = avcodec_open2(decoderCtx_, inputDecoder_, NULL);
     if (ret) {
         RING_ERR("Could not open codec");
@@ -318,7 +317,6 @@ int MediaDecoder::setupFromVideoData()
         startTime_ = av_gettime();
     }
 
-    decoderCtx_->refcounted_frames = 1;
     ret = avcodec_open2(decoderCtx_, inputDecoder_, NULL);
     if (ret) {
         RING_ERR("Could not open codec");
-- 
GitLab