[FFmpeg-cvslog] lavc: add a dummy field to AVStream to preserve ABI compatibility for avconv

Anton Khirnov git at videolan.org
Tue Oct 29 20:59:32 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Oct 28 14:59:20 2013 +0100| [8b64c2ba0382892cad9e1a5ba601696d4cbb4d04] | committer: Anton Khirnov

lavc: add a dummy field to AVStream to preserve ABI compatibility for avconv

avconv abuses the API by accessing AVStream.parser (which is private).
Removing AVStream.reference_dts in
2ba68dd044ca8fc591139c05563840f546a9c0c0 breaks ABI compatibility for an
old avconv using a newer lavf. Fix this by adding a dummy field until
the next bump.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b64c2ba0382892cad9e1a5ba601696d4cbb4d04
---

 libavformat/avformat.h |    5 +++++
 libavformat/version.h  |    3 +++
 2 files changed, 8 insertions(+)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index a8e3a7d..50e4f5c 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -729,6 +729,11 @@ typedef struct AVStream {
 
     int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */
 
+#if FF_API_REFERENCE_DTS
+    /* a hack to keep ABI compatibility for avconv, which accesses parser even
+     * though it should not */
+    int64_t do_not_use;
+#endif
     // Timestamp generation support:
     int64_t first_dts;
     int64_t cur_dts;
diff --git a/libavformat/version.h b/libavformat/version.h
index 43431a5..791933f 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -48,5 +48,8 @@
  * dropped at a future version bump. The defines themselves are not part of
  * the public API and may change, break or disappear at any time.
  */
+#ifndef FF_API_REFERENCE_DTS
+#define FF_API_REFERENCE_DTS            (LIBAVFORMAT_VERSION_MAJOR < 56)
+#endif
 
 #endif /* AVFORMAT_VERSION_H */



More information about the ffmpeg-cvslog mailing list