Commit db0a9432 authored by Vladimir Pantelic's avatar Vladimir Pantelic Committed by Anton Khirnov

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: 's avatarVladimir Pantelic <vladoman@gmail.com>
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 84b721db
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment