From 3a2ddf7c2c4d27b595a601c55af23129a5a8be0d Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sun, 1 May 2011 14:02:08 +0200 Subject: lavc: add width and height fields to AVFrame width and height are per-frame properties, setting these values in AVFrame simplify the operation of extraction of that information, since avoids the need to check the codec/stream context. --- libavcodec/utils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/utils.c') diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 7c1a7aea2a..74932ed71d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -860,6 +860,8 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi avpkt); picture->pkt_dts= avpkt->dts; picture->sample_aspect_ratio = avctx->sample_aspect_ratio; + picture->width = avctx->width; + picture->height = avctx->height; } emms_c(); //needed to avoid an emms_c() call before every return; -- cgit v1.2.3