diff --git a/libdash/qtsampleplayer/Decoder/LibavDecoder.cpp b/libdash/qtsampleplayer/Decoder/LibavDecoder.cpp index d51651ab..749fe12e 100644 --- a/libdash/qtsampleplayer/Decoder/LibavDecoder.cpp +++ b/libdash/qtsampleplayer/Decoder/LibavDecoder.cpp @@ -70,9 +70,9 @@ void LibavDecoder::NotifyVideo (AVFrame * avFrame, St props.linesize = avFrame->linesize; props.streamIndex = decoConf->stream->index; - if(decoConf->stream->codec->pix_fmt == PIX_FMT_YUV420P) + if(decoConf->stream->codec->pix_fmt == AV_PIX_FMT_YUV420P) props.pxlFmt = yuv420p; - if(decoConf->stream->codec->pix_fmt == PIX_FMT_YUV422P) + if(decoConf->stream->codec->pix_fmt == AV_PIX_FMT_YUV422P) props.pxlFmt = yuv422p; for(size_t i = 0; i < videoObservers.size(); i++) @@ -254,7 +254,7 @@ bool LibavDecoder::Init () if (this->errorHappened) return false; - this->frame = avcodec_alloc_frame(); + this->frame = av_frame_alloc(); av_init_packet(&this->avpkt); this->InitStreams(avFormatContextPtr); diff --git a/libdash/qtsampleplayer/libdashframework/Input/DASHManager.cpp b/libdash/qtsampleplayer/libdashframework/Input/DASHManager.cpp index 3c85af7b..7edd2aa5 100644 --- a/libdash/qtsampleplayer/libdashframework/Input/DASHManager.cpp +++ b/libdash/qtsampleplayer/libdashframework/Input/DASHManager.cpp @@ -101,13 +101,13 @@ void DASHManager::OnVideoFrameDecoded (const uint8_t **data, videoFram int w = props->width; int h = props->height; - AVFrame *rgbframe = avcodec_alloc_frame(); - int numBytes = avpicture_get_size(PIX_FMT_RGB24, w, h); + AVFrame *rgbframe = av_frame_alloc(); + int numBytes = avpicture_get_size(AV_PIX_FMT_RGB24, w, h); uint8_t *buffer = (uint8_t*)av_malloc(numBytes); - avpicture_fill((AVPicture*)rgbframe, buffer, PIX_FMT_RGB24, w, h); + avpicture_fill((AVPicture*)rgbframe, buffer, AV_PIX_FMT_RGB24, w, h); - SwsContext *imgConvertCtx = sws_getContext(props->width, props->height, (PixelFormat)props->pxlFmt, w, h, PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL); + SwsContext *imgConvertCtx = sws_getContext(props->width, props->height, (AVPixelFormat)props->pxlFmt, w, h, AV_PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL); sws_scale(imgConvertCtx, data, props->linesize, 0, h, rgbframe->data, rgbframe->linesize);