From a2eb9a14419ab28071a1ec4f461d123650a3460c Mon Sep 17 00:00:00 2001
From: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Date: Tue, 3 Feb 2015 09:26:04 -0500
Subject: [PATCH] daemon: don't use deprecated avcodec_alloc_frame

avcodec_alloc_frame is an deprecated API.
Now use av_frame_alloc.
libav_deps.h take care of backward compatibility.

Change-Id: Ifaf27e6908d09b5772c04fb819243901a3cb5660
---
 daemon/src/media/media_encoder.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemon/src/media/media_encoder.cpp b/daemon/src/media/media_encoder.cpp
index 5b4e4373bf..510d8acf1c 100644
--- a/daemon/src/media/media_encoder.cpp
+++ b/daemon/src/media/media_encoder.cpp
@@ -346,7 +346,7 @@ int MediaEncoder::encode_audio(const AudioBuffer &buffer)
     const auto sample_rate = buffer.getSampleRate();
 
     while (nb_frames > 0) {
-        AVFrame *frame = avcodec_alloc_frame();
+        AVFrame *frame = av_frame_alloc();
         if (!frame) {
             av_freep(&sample_data);
             return -1;
-- 
GitLab