Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
0ef30fab
Commit
0ef30fab
authored
Sep 02, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed timestamp in ffmpeg reget_buffer callback.
parent
4c8d8f49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+19
-5
No files found.
modules/codec/avcodec/video.c
View file @
0ef30fab
...
...
@@ -902,12 +902,20 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
static
int
ffmpeg_ReGetFrameBuf
(
struct
AVCodecContext
*
p_context
,
AVFrame
*
p_ff_pic
)
{
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_context
->
opaque
;
int
i_ret
;
/*
Set picture PTS
*/
ffmpeg_SetFrameBufferPts
(
p_dec
,
p_ff_pic
)
;
/* */
p_ff_pic
->
pts
=
AV_NOPTS_VALUE
;
/* We always use default reget function, it works perfectly fine */
return
avcodec_default_reget_buffer
(
p_context
,
p_ff_pic
);
i_ret
=
avcodec_default_reget_buffer
(
p_context
,
p_ff_pic
);
/* Set picture PTS if avcodec_default_reget_buffer didn't set it (through a
* ffmpeg_GetFrameBuf call) */
if
(
!
i_ret
&&
p_ff_pic
->
pts
==
AV_NOPTS_VALUE
)
ffmpeg_SetFrameBufferPts
(
p_dec
,
p_ff_pic
);
return
i_ret
;
}
static
void
ffmpeg_SetFrameBufferPts
(
decoder_t
*
p_dec
,
AVFrame
*
p_ff_pic
)
...
...
@@ -928,9 +936,15 @@ static void ffmpeg_SetFrameBufferPts( decoder_t *p_dec, AVFrame *p_ff_pic )
{
p_ff_pic
->
pts
=
p_sys
->
input_dts
;
}
else
p_ff_pic
->
pts
=
0
;
else
{
p_ff_pic
->
pts
=
0
;
}
}
else
{
p_ff_pic
->
pts
=
0
;
}
else
p_ff_pic
->
pts
=
0
;
if
(
p_sys
->
i_pts
)
/* make sure 1st frame has a pts > 0 */
{
...
...
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