summaryrefslogtreecommitdiff
path: root/libavcodec/qtrleenc.c
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2016-06-22 11:06:04 +0200
committerClément Bœsch <clement@stupeflix.com>2016-06-22 11:06:04 +0200
commite6247a22c0238a73024f29bcced8ae828fe3b39a (patch)
tree28cd7ac186ac8d5c0bfbf73e5a937072ea258b3e /libavcodec/qtrleenc.c
parentdf3484f87c4ddec548676a9eb38e6fc69aaceea6 (diff)
parent763d69bfb2f0094e99f43e657cfd2b0471361f6b (diff)
downloadffmpeg-e6247a22c0238a73024f29bcced8ae828fe3b39a.tar.gz
Merge commit '763d69bfb2f0094e99f43e657cfd2b0471361f6b'
* commit '763d69bfb2f0094e99f43e657cfd2b0471361f6b': Add some more deprecation guards - psnr() deprecation is not merged within ffmpeg.c as we still use it in non-deprecated code - the XVMC chunk is not merged as we still apparently maintain it - The guarding in lavc/qtrleenc.c could be simplified but merged anyway. Merged-by: Clément Bœsch <clement@stupeflix.com>
Diffstat (limited to 'libavcodec/qtrleenc.c')
-rw-r--r--libavcodec/qtrleenc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index 5aa7420ae4..adbd9f3b44 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -363,7 +363,9 @@ static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
QtrleEncContext * const s = avctx->priv_data;
+#if FF_API_CODED_FRAME
enum AVPictureType pict_type;
+#endif
int ret;
if ((ret = ff_alloc_packet2(avctx, pkt, s->max_buf_size, 0)) < 0)
@@ -371,11 +373,15 @@ static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if (avctx->gop_size == 0 || (s->avctx->frame_number % avctx->gop_size) == 0) {
/* I-Frame */
+#if FF_API_CODED_FRAME
pict_type = AV_PICTURE_TYPE_I;
+#endif
s->key_frame = 1;
} else {
/* P-Frame */
+#if FF_API_CODED_FRAME
pict_type = AV_PICTURE_TYPE_P;
+#endif
s->key_frame = 0;
}