Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
0eb0b310
Commit
0eb0b310
authored
Jul 12, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: add pkt_timebase to allow avcodec to adjust pkt_dts/pts when needed
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cb59e62a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
1 deletion
+16
-1
avcodec.h
libavcodec/avcodec.h
+12
-0
options_table.h
libavcodec/options_table.h
+1
-0
utils.c
libavcodec/utils.c
+2
-0
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/avcodec.h
View file @
0eb0b310
...
...
@@ -2946,6 +2946,15 @@ typedef struct AVCodecContext {
*/
uint64_t
vbv_delay
;
/**
* Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
* Code outside libavcodec should access this field using:
* avcodec_set_pkt_timebase(avctx)
* - encoding unused.
* - decodimg set by user
*/
AVRational
pkt_timebase
;
/**
* Current statistics for PTS correction.
* - decoding: maintained and used by libavcodec, not intended to be used by user apps
...
...
@@ -2957,6 +2966,9 @@ typedef struct AVCodecContext {
int64_t
pts_correction_last_dts
;
/// DTS of the last frame
}
AVCodecContext
;
AVRational
av_codec_get_pkt_timebase
(
const
AVCodecContext
*
avctx
);
void
av_codec_set_pkt_timebase
(
AVCodecContext
*
avctx
,
AVRational
val
);
/**
* AVProfile.
*/
...
...
libavcodec/options_table.h
View file @
0eb0b310
...
...
@@ -409,6 +409,7 @@ static const AVOption options[]={
{
"s32p"
,
"32-bit signed integer planar"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
AV_SAMPLE_FMT_S32P
},
INT_MIN
,
INT_MAX
,
A
|
D
,
"request_sample_fmt"
},
{
"fltp"
,
"32-bit float planar"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
AV_SAMPLE_FMT_FLTP
},
INT_MIN
,
INT_MAX
,
A
|
D
,
"request_sample_fmt"
},
{
"dblp"
,
"64-bit double planar"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
AV_SAMPLE_FMT_DBLP
},
INT_MIN
,
INT_MAX
,
A
|
D
,
"request_sample_fmt"
},
{
"pkt_timebase"
,
NULL
,
OFFSET
(
pkt_timebase
),
AV_OPT_TYPE_RATIONAL
,
{.
dbl
=
0
},
0
,
INT_MAX
,
0
},
{
NULL
},
};
...
...
libavcodec/utils.c
View file @
0eb0b310
...
...
@@ -726,6 +726,8 @@ MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_pos)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
channel_layout
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int
,
sample_rate
)
MAKE_ACCESSORS
(
AVCodecContext
,
codec
,
AVRational
,
pkt_timebase
)
static
void
avcodec_get_subtitle_defaults
(
AVSubtitle
*
sub
)
{
memset
(
sub
,
0
,
sizeof
(
*
sub
));
...
...
libavcodec/version.h
View file @
0eb0b310
...
...
@@ -27,7 +27,7 @@
*/
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 3
5
#define LIBAVCODEC_VERSION_MINOR 3
6
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment