Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
5ac16455
Commit
5ac16455
authored
Dec 29, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PTS calculation fix for the mad plug-in, courtesy of KKI_ on IRC.
parent
621ed463
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
modules/codec/mad/libmad.c
modules/codec/mad/libmad.c
+14
-3
No files found.
modules/codec/mad/libmad.c
View file @
5ac16455
...
@@ -44,7 +44,7 @@ static void PrintFrameInfo(struct mad_header *Header);
...
@@ -44,7 +44,7 @@ static void PrintFrameInfo(struct mad_header *Header);
enum
mad_flow
libmad_input
(
void
*
p_data
,
struct
mad_stream
*
p_stream
)
enum
mad_flow
libmad_input
(
void
*
p_data
,
struct
mad_stream
*
p_stream
)
{
{
mad_adec_thread_t
*
p_dec
=
(
mad_adec_thread_t
*
)
p_data
;
mad_adec_thread_t
*
p_dec
=
(
mad_adec_thread_t
*
)
p_data
;
size_t
i_wanted
,
i_left
;
size_t
i_wanted
,
i_left
,
i_current
;
if
(
p_dec
->
p_fifo
->
b_die
)
if
(
p_dec
->
p_fifo
->
b_die
)
{
{
...
@@ -73,7 +73,8 @@ enum mad_flow libmad_input( void *p_data, struct mad_stream *p_stream )
...
@@ -73,7 +73,8 @@ enum mad_flow libmad_input( void *p_data, struct mad_stream *p_stream )
* (448000*(1152/32000))/8 */
* (448000*(1152/32000))/8 */
if
(
p_stream
->
next_frame
)
if
(
p_stream
->
next_frame
)
{
{
i_left
=
p_stream
->
bufend
-
p_stream
->
next_frame
;
i_left
=
p_stream
->
bufend
-
p_stream
->
next_frame
;
i_current
=
p_stream
->
next_frame
-
p_dec
->
buffer
;
if
(
p_dec
->
buffer
!=
p_stream
->
next_frame
)
if
(
p_dec
->
buffer
!=
p_stream
->
next_frame
)
{
{
memcpy
(
p_dec
->
buffer
,
p_stream
->
next_frame
,
i_left
);
memcpy
(
p_dec
->
buffer
,
p_stream
->
next_frame
,
i_left
);
...
@@ -81,7 +82,17 @@ enum mad_flow libmad_input( void *p_data, struct mad_stream *p_stream )
...
@@ -81,7 +82,17 @@ enum mad_flow libmad_input( void *p_data, struct mad_stream *p_stream )
i_wanted
=
MAD_BUFFER_MDLEN
-
i_left
;
i_wanted
=
MAD_BUFFER_MDLEN
-
i_left
;
/* Store timestamp for next frame */
/* Store timestamp for next frame */
p_dec
->
i_next_pts
=
p_dec
->
bit_stream
.
p_pes
->
i_pts
;
if
(
(
p_stream
->
next_frame
==
p_dec
->
buffer
)
||
(
i_current
>=
i_left
*
(
(
i_current
/
(
MAD_BUFFER_MDLEN
-
i_current
)
)
+
1
)
)
)
{
p_dec
->
i_next_pts
=
p_dec
->
bit_stream
.
p_pes
->
i_pts
;
}
else
{
/* p_dec->bit_stream.p_pes->i_pts != p_dec->i_next_pts */
p_dec
->
i_next_pts
=
0
;
}
}
}
else
else
{
{
...
...
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