aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Pantelic <vladoman@gmail.com>2013-02-07 18:42:39 +0100
committerAnton Khirnov <anton@khirnov.net>2013-02-09 18:57:21 +0100
commitdb0a943266be29ff0596872ebb418dfed75d00de (patch)
treefd50d5e692830d26a7d7355bc4045e4823eb7d1b
parent84b721db366c0734fdfd23c8daaa7da7da21f761 (diff)
downloadffmpeg-db0a943266be29ff0596872ebb418dfed75d00de.tar.gz
avplay: apply the stream sample_aspect_ratio to decoded video frames
If there is a sample_aspect_ratio in the stream, then apply it to every decoded frame in the same way as avconv does. This also makes sure that the avfilter chain has access to the aspect ratio. Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--avplay.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/avplay.c b/avplay.c
index 3e2110f423..c45ec55b2a 100644
--- a/avplay.c
+++ b/avplay.c
@@ -1495,6 +1495,9 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
if (*pts == AV_NOPTS_VALUE) {
*pts = 0;
}
+ if (is->video_st->sample_aspect_ratio.num) {
+ frame->sample_aspect_ratio = is->video_st->sample_aspect_ratio;
+ }
is->skip_frames_index += 1;
if (is->skip_frames_index >= is->skip_frames) {