You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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.
This commit is contained in:
4
ffplay.c
4
ffplay.c
@@ -1641,10 +1641,12 @@ static int input_config_props(AVFilterLink *link)
|
|||||||
{
|
{
|
||||||
FilterPriv *priv = link->src->priv;
|
FilterPriv *priv = link->src->priv;
|
||||||
AVCodecContext *c = priv->is->video_st->codec;
|
AVCodecContext *c = priv->is->video_st->codec;
|
||||||
|
AVStream *s = priv->is->video_st;
|
||||||
|
|
||||||
link->w = c->width;
|
link->w = c->width;
|
||||||
link->h = c->height;
|
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;
|
link->time_base = priv->is->video_st->time_base;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user