Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
5b526f50
Commit
5b526f50
authored
Feb 09, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed NAL AUD handling in h264 packetizer.
parent
a4428471
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
modules/packetizer/h264.c
modules/packetizer/h264.c
+34
-6
No files found.
modules/packetizer/h264.c
View file @
5b526f50
...
...
@@ -31,6 +31,7 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
...
...
@@ -151,6 +152,8 @@ enum nal_priority_e
NAL_PRIORITY_HIGHEST
=
3
,
};
#define BLOCK_FLAG_PRIVATE_AUD (1 << BLOCK_FLAG_PRIVATE_SHIFT)
static
block_t
*
Packetize
(
decoder_t
*
,
block_t
**
);
static
block_t
*
PacketizeAVC1
(
decoder_t
*
,
block_t
**
);
static
block_t
*
GetCc
(
decoder_t
*
p_dec
,
bool
pb_present
[
4
]
);
...
...
@@ -663,7 +666,21 @@ static block_t *ParseNALBlock( decoder_t *p_dec, bool *pb_used_ts, block_t *p_fr
/* Parse SEI for CC support */
if
(
i_nal_type
==
NAL_SEI
)
{
ParseSei
(
p_dec
,
p_frag
);
}
else
if
(
i_nal_type
==
NAL_AU_DELIMITER
)
{
if
(
p_sys
->
p_frame
&&
(
p_sys
->
p_frame
->
i_flags
&
BLOCK_FLAG_PRIVATE_AUD
)
)
{
block_Release
(
p_frag
);
p_frag
=
NULL
;
}
else
{
p_frag
->
i_flags
|=
BLOCK_FLAG_PRIVATE_AUD
;
}
}
}
/* Append the block */
...
...
@@ -691,15 +708,20 @@ static block_t *OutputPicture( decoder_t *p_dec )
if
(
p_sys
->
slice
.
i_frame_type
==
BLOCK_FLAG_TYPE_I
&&
p_sys
->
b_sps
&&
p_sys
->
b_pps
)
{
block_t
*
p_list
=
NULL
;
int
i
;
block_t
*
p_head
=
NULL
;
if
(
p_sys
->
p_frame
->
i_flags
&
BLOCK_FLAG_PRIVATE_AUD
)
{
p_head
=
p_sys
->
p_frame
;
p_sys
->
p_frame
=
p_sys
->
p_frame
->
p_next
;
}
for
(
i
=
0
;
i
<
SPS_MAX
;
i
++
)
block_t
*
p_list
=
NULL
;
for
(
int
i
=
0
;
i
<
SPS_MAX
;
i
++
)
{
if
(
p_sys
->
pp_sps
[
i
]
)
block_ChainAppend
(
&
p_list
,
block_Duplicate
(
p_sys
->
pp_sps
[
i
]
)
);
}
for
(
i
=
0
;
i
<
PPS_MAX
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
PPS_MAX
;
i
++
)
{
if
(
p_sys
->
pp_pps
[
i
]
)
block_ChainAppend
(
&
p_list
,
block_Duplicate
(
p_sys
->
pp_pps
[
i
]
)
);
...
...
@@ -707,8 +729,13 @@ static block_t *OutputPicture( decoder_t *p_dec )
if
(
p_list
)
p_sys
->
b_header
=
true
;
block_ChainAppend
(
&
p_list
,
p_sys
->
p_frame
);
p_pic
=
block_ChainGather
(
p_list
);
if
(
p_head
)
p_head
->
p_next
=
p_list
;
else
p_head
=
p_list
;
block_ChainAppend
(
&
p_head
,
p_sys
->
p_frame
);
p_pic
=
block_ChainGather
(
p_head
);
}
else
{
...
...
@@ -718,6 +745,7 @@ static block_t *OutputPicture( decoder_t *p_dec )
p_pic
->
i_pts
=
p_sys
->
i_frame_pts
;
p_pic
->
i_length
=
0
;
/* FIXME */
p_pic
->
i_flags
|=
p_sys
->
slice
.
i_frame_type
;
p_pic
->
i_flags
&=
~
BLOCK_FLAG_PRIVATE_AUD
;
p_sys
->
slice
.
i_frame_type
=
0
;
p_sys
->
p_frame
=
NULL
;
...
...
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