mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user