avcodec/setts_bsf: add a NOPTS constant

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2021-07-03 16:24:59 -03:00
parent b0b3fce3c3
commit 041267b558
3 changed files with 7 additions and 1 deletions

View File

@ -735,6 +735,9 @@ The timebase of stream packet belongs.
@item SR @item SR
The sample rate of stream packet belongs. The sample rate of stream packet belongs.
@item NOPTS
The AV_NOPTS_VALUE constant.
@end table @end table
@anchor{text2movsub} @anchor{text2movsub}

View File

@ -44,6 +44,7 @@ static const char *const var_names[] = {
"STARTDTS", ///< DTS at start of movie "STARTDTS", ///< DTS at start of movie
"TB", ///< timebase of the stream "TB", ///< timebase of the stream
"SR", ///< sample rate of the stream "SR", ///< sample rate of the stream
"NOPTS", ///< The AV_NOPTS_VALUE constant
NULL NULL
}; };
@ -61,6 +62,7 @@ enum var_name {
VAR_STARTDTS, VAR_STARTDTS,
VAR_TB, VAR_TB,
VAR_SR, VAR_SR,
VAR_NOPTS,
VAR_VARS_NB VAR_VARS_NB
}; };
@ -121,6 +123,7 @@ static int setts_init(AVBSFContext *ctx)
s->prev_indts = AV_NOPTS_VALUE; s->prev_indts = AV_NOPTS_VALUE;
s->prev_outpts = AV_NOPTS_VALUE; s->prev_outpts = AV_NOPTS_VALUE;
s->prev_outdts = AV_NOPTS_VALUE; s->prev_outdts = AV_NOPTS_VALUE;
s->var_values[VAR_NOPTS] = AV_NOPTS_VALUE;
return 0; return 0;
} }

View File

@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 59 #define LIBAVCODEC_VERSION_MAJOR 59
#define LIBAVCODEC_VERSION_MINOR 3 #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, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \