From 57881419122d0d9dbc78782a2542281b4260946a Mon Sep 17 00:00:00 2001 From: codestation Date: Sat, 28 Feb 2015 00:24:59 -0430 Subject: [PATCH] Update deprecated avcodec call. --- src/avdecoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/avdecoder.cpp b/src/avdecoder.cpp index 012bb86..4f5b4f1 100644 --- a/src/avdecoder.cpp +++ b/src/avdecoder.cpp @@ -144,7 +144,7 @@ QByteArray AVDecoder::getAudioThumbnail(int width, int height) AVFrame *AVDecoder::getDecodedFrame(AVCodecContext *codec_ctx, int frame_stream_index) { - AVFrame *pFrame = avcodec_alloc_frame(); + AVFrame *pFrame = av_frame_alloc(); AVPacket packet; int frame_finished = 0; @@ -188,7 +188,7 @@ QByteArray AVDecoder::getVideoThumbnail(int width, int height) return data; } - AVFrame *pFrameRGB = avcodec_alloc_frame(); + AVFrame *pFrameRGB = av_frame_alloc(); int numBytes = avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height); uint8_t *buffer = (uint8_t *)av_malloc(numBytes);