mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
lavfi/setpts: set SAMPLE_RATE to NAN when input is no audio
Should be more robust/consistent.
This commit is contained in:
parent
722762f7e1
commit
206c34e17d
@ -106,8 +106,8 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
setpts->type = inlink->type;
|
setpts->type = inlink->type;
|
||||||
setpts->var_values[VAR_TB] = av_q2d(inlink->time_base);
|
setpts->var_values[VAR_TB] = av_q2d(inlink->time_base);
|
||||||
|
|
||||||
if (setpts->type == AVMEDIA_TYPE_AUDIO)
|
setpts->var_values[VAR_SAMPLE_RATE] =
|
||||||
setpts->var_values[VAR_SAMPLE_RATE] = inlink->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 ?
|
setpts->var_values[VAR_FRAME_RATE] = inlink->frame_rate.num && inlink->frame_rate.den ?
|
||||||
av_q2d(inlink->frame_rate) : NAN;
|
av_q2d(inlink->frame_rate) : NAN;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#define LIBAVFILTER_VERSION_MAJOR 3
|
#define LIBAVFILTER_VERSION_MAJOR 3
|
||||||
#define LIBAVFILTER_VERSION_MINOR 16
|
#define LIBAVFILTER_VERSION_MINOR 16
|
||||||
#define LIBAVFILTER_VERSION_MICRO 102
|
#define LIBAVFILTER_VERSION_MICRO 103
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||||
LIBAVFILTER_VERSION_MINOR, \
|
LIBAVFILTER_VERSION_MINOR, \
|
||||||
|
Loading…
Reference in New Issue
Block a user