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.
This commit is contained in:
Stefano Sabatini
2011-05-01 14:02:08 +02:00
parent 314374e579
commit 22333a6b19
5 changed files with 17 additions and 1 deletions

View File

@@ -739,6 +739,10 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
picture->pkt_pos= avpkt->pos;
if (!picture->sample_aspect_ratio.num)
picture->sample_aspect_ratio = avctx->sample_aspect_ratio;
if (!picture->width)
picture->width = avctx->width;
if (!picture->height)
picture->height = avctx->height;
}
emms_c(); //needed to avoid an emms_c() call before every return;