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
063ae6fe
Commit
063ae6fe
authored
Apr 28, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made sure that packetizer_Header will parse everything (vc1/h264).
parent
48182abf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
modules/packetizer/packetizer_helper.h
modules/packetizer/packetizer_helper.h
+22
-1
No files found.
modules/packetizer/packetizer_helper.h
View file @
063ae6fe
...
...
@@ -41,6 +41,7 @@ typedef struct
int
i_state
;
block_bytestream_t
bytestream
;
size_t
i_offset
;
bool
b_flushing
;
int
i_startcode
;
const
uint8_t
*
p_startcode
;
...
...
@@ -66,6 +67,7 @@ static inline void packetizer_Init( packetizer_t *p_pack,
p_pack
->
i_state
=
STATE_NOSYNC
;
p_pack
->
bytestream
=
block_BytestreamInit
();
p_pack
->
i_offset
=
0
;
p_pack
->
b_flushing
=
false
;
p_pack
->
i_au_prepend
=
i_au_prepend
;
p_pack
->
p_au_prepend
=
p_au_prepend
;
...
...
@@ -134,8 +136,20 @@ static inline block_t *packetizer_Packetize( packetizer_t *p_pack, block_t **pp_
/* Find the next startcode */
if
(
block_FindStartcodeFromOffset
(
&
p_pack
->
bytestream
,
&
p_pack
->
i_offset
,
p_pack
->
p_startcode
,
p_pack
->
i_startcode
)
)
{
if
(
!
p_pack
->
b_flushing
||
!
p_pack
->
bytestream
.
p_chain
)
return
NULL
;
/* Need more data */
/* When flusing and we don't find a startcode, suppose that
* the data extend up to the end */
block_ChainProperties
(
p_pack
->
bytestream
.
p_chain
,
NULL
,
&
p_pack
->
i_offset
,
NULL
);
p_pack
->
i_offset
-=
p_pack
->
bytestream
.
i_offset
;
if
(
p_pack
->
i_offset
<=
(
size_t
)
p_pack
->
i_startcode
)
return
NULL
;
}
block_BytestreamFlush
(
&
p_pack
->
bytestream
);
/* Get the new fragment and set the pts/dts */
...
...
@@ -191,9 +205,16 @@ static inline void packetizer_Header( packetizer_t *p_pack,
memcpy
(
p_init
->
p_buffer
,
p_header
,
i_header
);
p_pack
->
b_flushing
=
true
;
block_t
*
p_pic
;
while
(
(
p_pic
=
packetizer_Packetize
(
p_pack
,
&
p_init
)
)
)
block_Release
(
p_pic
);
/* Should not happen (only sequence header) */
p_pack
->
i_state
=
STATE_NOSYNC
;
block_BytestreamEmpty
(
&
p_pack
->
bytestream
);
p_pack
->
i_offset
=
0
;
p_pack
->
b_flushing
=
false
;
}
#endif
...
...
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