diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-09-10 14:02:30 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-09-10 20:52:28 +0400 |
commit | 206c34e17d7d8797811d9d48ef932db045649aa6 (patch) | |
tree | 4dc561084121aa12e97322482dfb74388ce7512b /libavfilter/f_setpts.c | |
parent | 722762f7e1212b4d02142778fabfdd73375722e0 (diff) |
lavfi/setpts: set SAMPLE_RATE to NAN when input is no audio
Should be more robust/consistent.
Diffstat (limited to 'libavfilter/f_setpts.c')
-rw-r--r-- | libavfilter/f_setpts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/f_setpts.c b/libavfilter/f_setpts.c index 6227fe02a4..023dc1e672 100644 --- a/libavfilter/f_setpts.c +++ b/libavfilter/f_setpts.c @@ -106,8 +106,8 @@ static int config_input(AVFilterLink *inlink) setpts->type = inlink->type; setpts->var_values[VAR_TB] = av_q2d(inlink->time_base); - if (setpts->type == AVMEDIA_TYPE_AUDIO) - setpts->var_values[VAR_SAMPLE_RATE] = inlink->sample_rate; + setpts->var_values[VAR_SAMPLE_RATE] = + setpts->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN; setpts->var_values[VAR_FRAME_RATE] = inlink->frame_rate.num && inlink->frame_rate.den ? av_q2d(inlink->frame_rate) : NAN; |