There is no real reason for it to be 64bit, it's just a plain int in the
rest of Libav.
This breaks audio filtering API and ABI in theory, but since it's
unusable right now this shouldn't be a problem.
Does not break ABI for the rest of lavfi assuming 32bit ints.
---
libavfilter/avfilter.h | 5 ++++-
libavfilter/version.h | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 6db143b..13a4dfd 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -596,7 +596,10 @@ struct AVFilterLink {
AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
/* These two parameters apply only to audio */
uint64_t channel_layout; ///< channel layout of current buffer (see
libavutil/audioconvert.h)
- int64_t sample_rate; ///< samples per second
+ int sample_rate; ///< samples per second
+#if FF_API_SAMPLERATE64
+ int unused; ///< for ABI compatibility only
+#endif
int format; ///< agreed upon media format
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 718ed78..ae172be 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -47,5 +47,8 @@
#ifndef FF_API_GRAPH_AVCLASS
#define FF_API_GRAPH_AVCLASS (LIBAVFILTER_VERSION_MAJOR > 2)
#endif
+#ifndef FF_API_SAMPLERATE64
+#define FF_API_SAMPLERATE64 (LIBAVFILTER_VERSION_MAJOR < 3)
+#endif
#endif // AVFILTER_VERSION_H
--
1.7.9.5
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel