[FFmpeg-cvslog] lavfi/setpts: set SAMPLE_RATE to NAN when input is no audio
Stefano Sabatini
git at videolan.org
Mon Sep 10 18:55:24 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Sep 10 12:02:30 2012 +0200| [206c34e17d7d8797811d9d48ef932db045649aa6] | committer: Stefano Sabatini
lavfi/setpts: set SAMPLE_RATE to NAN when input is no audio
Should be more robust/consistent.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=206c34e17d7d8797811d9d48ef932db045649aa6
---
libavfilter/f_setpts.c | 4 ++--
libavfilter/version.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavfilter/f_setpts.c b/libavfilter/f_setpts.c
index 6227fe0..023dc1e 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;
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 9d96d77..5f64228 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,7 +30,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#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, \
LIBAVFILTER_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list