summaryrefslogtreecommitdiff
path: root/libavfilter/vsrc_movie.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-04-29 13:04:47 +0200
committerAnton Khirnov <anton@khirnov.net>2011-12-25 16:18:57 +0100
commitb58dbb5b031c33cdb88f13cc533f623e82cdbcbd (patch)
tree1bb0334e817102f10c84466ccdad4a931ccb0f05 /libavfilter/vsrc_movie.c
parent671005558a295945f5d4cfd1abca6832af479c0b (diff)
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.
Diffstat (limited to 'libavfilter/vsrc_movie.c')
-rw-r--r--libavfilter/vsrc_movie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c
index dec499904e..a1764732b6 100644
--- a/libavfilter/vsrc_movie.c
+++ b/libavfilter/vsrc_movie.c
@@ -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;