[FFmpeg-cvslog] avcodec/setts_bsf: add a NOPTS constant

James Almer git at videolan.org
Sun Jul 4 17:20:02 EEST 2021


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Jul  3 16:24:59 2021 -0300| [041267b55871a5066e4acb5e29b545fede5998c9] | committer: James Almer

avcodec/setts_bsf: add a NOPTS constant

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

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

 doc/bitstream_filters.texi | 3 +++
 libavcodec/setts_bsf.c     | 3 +++
 libavcodec/version.h       | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
index e3c56f1887..d10842ae47 100644
--- a/doc/bitstream_filters.texi
+++ b/doc/bitstream_filters.texi
@@ -735,6 +735,9 @@ The timebase of stream packet belongs.
 
 @item SR
 The sample rate of stream packet belongs.
+
+ at item NOPTS
+The AV_NOPTS_VALUE constant.
 @end table
 
 @anchor{text2movsub}
diff --git a/libavcodec/setts_bsf.c b/libavcodec/setts_bsf.c
index 1e43036ee1..d7d13d2652 100644
--- a/libavcodec/setts_bsf.c
+++ b/libavcodec/setts_bsf.c
@@ -44,6 +44,7 @@ static const char *const var_names[] = {
     "STARTDTS",    ///< DTS at start of movie
     "TB",          ///< timebase of the stream
     "SR",          ///< sample rate of the stream
+    "NOPTS",       ///< The AV_NOPTS_VALUE constant
     NULL
 };
 
@@ -61,6 +62,7 @@ enum var_name {
     VAR_STARTDTS,
     VAR_TB,
     VAR_SR,
+    VAR_NOPTS,
     VAR_VARS_NB
 };
 
@@ -121,6 +123,7 @@ static int setts_init(AVBSFContext *ctx)
     s->prev_indts  = AV_NOPTS_VALUE;
     s->prev_outpts = AV_NOPTS_VALUE;
     s->prev_outdts = AV_NOPTS_VALUE;
+    s->var_values[VAR_NOPTS] = AV_NOPTS_VALUE;
 
     return 0;
 }
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 2a420a7e28..c660f70669 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  59
 #define LIBAVCODEC_VERSION_MINOR   3
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list