mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
lavc: add a sample_aspect_ratio field to AVFrame
The sample aspect ratio is a per-frame property, so it makes sense to define it in AVFrame rather than in the codec/stream context. Simplify application-level sample aspect ratio information extraction, and allow further simplifications.
This commit is contained in:
committed by
Anton Khirnov
parent
671005558a
commit
b58dbb5b03
@@ -248,8 +248,8 @@ static int movie_get_frame(AVFilterLink *outlink)
|
||||
movie->frame->pkt_dts : movie->frame->pkt_pts;
|
||||
|
||||
movie->picref->pos = movie->frame->reordered_opaque;
|
||||
movie->picref->video->pixel_aspect = st->sample_aspect_ratio.num ?
|
||||
st->sample_aspect_ratio : movie->codec_ctx->sample_aspect_ratio;
|
||||
if (!movie->frame->sample_aspect_ratio.num)
|
||||
movie->picref->video->pixel_aspect = st->sample_aspect_ratio;
|
||||
movie->picref->video->interlaced = movie->frame->interlaced_frame;
|
||||
movie->picref->video->top_field_first = movie->frame->top_field_first;
|
||||
movie->picref->video->key_frame = movie->frame->key_frame;
|
||||
|
||||
Reference in New Issue
Block a user