aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-08-16 17:26:31 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-08-17 10:29:34 +0200
commitf8eaa006b61413afa3d8434eef0a2fe7d76f0097 (patch)
treec4248849ceb96f0f6e479cb3911dec1cc064ea67 /ffplay.c
parent41bf67d8d4dd02b93df45d7862dbec4536738b5e (diff)
downloadffmpeg-f8eaa006b61413afa3d8434eef0a2fe7d76f0097.tar.gz
ffplay: in input_config_props(), honour the SAR specified in the codec context
Use the value specified in the codec context for setting the filterchain sample aspect ratio, when it is not specified in the stream context. Consistent with the ffmpeg behavior. Fix trac issue #398.
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index f116db98c6..13f6688db0 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1641,10 +1641,12 @@ static int input_config_props(AVFilterLink *link)
{
FilterPriv *priv = link->src->priv;
AVCodecContext *c = priv->is->video_st->codec;
+ AVStream *s = priv->is->video_st;
link->w = c->width;
link->h = c->height;
- link->sample_aspect_ratio = priv->is->video_st->sample_aspect_ratio;
+ link->sample_aspect_ratio = s->sample_aspect_ratio.num ?
+ s->sample_aspect_ratio : c->sample_aspect_ratio;
link->time_base = priv->is->video_st->time_base;
return 0;