Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f3488abf
Commit
f3488abf
authored
Mar 13, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mpeg4video.c: better pts...
parent
d87a02e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
modules/packetizer/mpeg4video.c
modules/packetizer/mpeg4video.c
+15
-2
No files found.
modules/packetizer/mpeg4video.c
View file @
f3488abf
...
...
@@ -66,6 +66,8 @@ struct decoder_sys_t
int
i_buffer_size
;
uint8_t
*
p_buffer
;
unsigned
int
i_flags
;
vlc_bool_t
b_frame
;
};
static
int
m4v_FindStartCode
(
uint8_t
**
pp_start
,
uint8_t
*
p_end
);
...
...
@@ -133,6 +135,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_buffer_size
=
0
;
p_sys
->
p_buffer
=
0
;
p_sys
->
i_flags
=
0
;
p_sys
->
b_frame
=
VLC_FALSE
;
/* Setup properties */
p_dec
->
fmt_out
=
p_dec
->
fmt_in
;
...
...
@@ -295,7 +298,8 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
p_sys
->
i_flags
=
BLOCK_FLAG_TYPE_P
;
break
;
case
2
:
p_sys
->
i_flags
=
BLOCK_FLAG_TYPE_P
;
p_sys
->
i_flags
=
BLOCK_FLAG_TYPE_B
;
p_sys
->
b_frame
=
VLC_TRUE
;
break
;
case
3
:
/* gni ? */
p_sys
->
i_flags
=
BLOCK_FLAG_TYPE_PB
;
...
...
@@ -308,14 +312,23 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
{
p_sys
->
i_pts
=
p_block
->
i_pts
;
}
else
else
if
(
(
p_sys
->
i_flags
&
BLOCK_FLAG_TYPE_B
)
||
!
p_sys
->
b_frame
)
{
p_sys
->
i_pts
=
p_block
->
i_dts
;
}
else
{
p_sys
->
i_pts
=
0
;
}
if
(
p_block
->
i_dts
>
0
)
{
p_sys
->
i_dts
=
p_block
->
i_dts
;
}
else
if
(
p_sys
->
i_dts
>
0
)
{
/* XXX KLUDGE immonde, else transcode won't work */
p_sys
->
i_dts
+=
1000
;
}
}
p_start
+=
4
;
/* Next */
}
...
...
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