[FFmpeg-devel] [PATCH 2/4] ffplay: use stream sample_aspect_ratio if available in source frames

Marton Balint cus at passwd.hu
Tue May 15 01:33:34 CEST 2012


When we are using filter chains we have to set the aspect ratio of the source
to the best known value, we use the av_guess_sample_aspect_ratio function to
determine that.

Fixes ticket 1228.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 ffplay.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index a9d710e..ef196c2 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1688,6 +1688,7 @@ static int input_request_frame(AVFilterLink *link)
     av_free_packet(&pkt);
 
     avfilter_copy_frame_props(picref, priv->frame);
+    picref->video->sample_aspect_ratio = av_guess_sample_aspect_ratio(priv->is->ic, priv->is->video_st, priv->frame);
     picref->pts = pts;
 
     avfilter_start_frame(link, picref);
-- 
1.7.3.4



More information about the ffmpeg-devel mailing list