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
6f7e4d56
Commit
6f7e4d56
authored
Dec 08, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mux: mp4: use nal defined values
parent
a0f65bae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
modules/mux/mp4/libmp4mux.c
modules/mux/mp4/libmp4mux.c
+15
-14
No files found.
modules/mux/mp4/libmp4mux.c
View file @
6f7e4d56
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
*****************************************************************************/
*****************************************************************************/
#include "libmp4mux.h"
#include "libmp4mux.h"
#include "../demux/mp4/libmp4.h"
/* flags */
#include "../demux/mp4/libmp4.h"
/* flags */
#include "../packetizer/hevc_nal.h"
#include "../packetizer/h264_nal.h"
/* h264_get_spspps */
#include "../packetizer/h264_nal.h"
/* h264_get_spspps */
#include "../packetizer/hxxx_nal.h"
#include "../packetizer/hxxx_nal.h"
...
@@ -610,9 +611,9 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -610,9 +611,9 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
if
(
p_nal
)
if
(
p_nal
)
p_nal
->
i_buffer
=
p_buffer
-
p_nal
->
p_buffer
-
((
i_buffer
)
?
3
:
0
);
p_nal
->
i_buffer
=
p_buffer
-
p_nal
->
p_buffer
-
((
i_buffer
)
?
3
:
0
);
switch
(
*
p_buffer
&
0x72
)
{
switch
(
(
*
p_buffer
&
0x7E
)
>>
1
)
{
/* VPS */
case
0x40
:
case
HEVC_NAL_VPS
:
p_nal
=
&
p_vps
[
i_vps
++
];
p_nal
=
&
p_vps
[
i_vps
++
];
p_nal
->
p_buffer
=
p_buffer
;
p_nal
->
p_buffer
=
p_buffer
;
/* Only keep the general profile from the first VPS
/* Only keep the general profile from the first VPS
...
@@ -623,8 +624,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -623,8 +624,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
i_num_arrays
++
;
i_num_arrays
++
;
}
}
break
;
break
;
/* SPS */
case
0x42
:
{
case
HEVC_NAL_SPS
:
{
struct
nal
*
p_tmp
=
realloc
(
p_sps
,
sizeof
(
struct
nal
)
*
(
i_sps
+
1
));
struct
nal
*
p_tmp
=
realloc
(
p_sps
,
sizeof
(
struct
nal
)
*
(
i_sps
+
1
));
if
(
!
p_tmp
)
if
(
!
p_tmp
)
break
;
break
;
...
@@ -639,8 +640,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -639,8 +640,8 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
}
}
break
;
break
;
}
}
/* PPS */
case
0x44
:
{
case
HEVC_NAL_PPS
:
{
struct
nal
*
p_tmp
=
realloc
(
p_pps
,
sizeof
(
struct
nal
)
*
(
i_pps
+
1
));
struct
nal
*
p_tmp
=
realloc
(
p_pps
,
sizeof
(
struct
nal
)
*
(
i_pps
+
1
));
if
(
!
p_tmp
)
if
(
!
p_tmp
)
break
;
break
;
...
@@ -651,9 +652,9 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -651,9 +652,9 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
i_num_arrays
++
;
i_num_arrays
++
;
break
;
break
;
}
}
/* SEI */
case
0x4E
:
case
HEVC_NAL_PREF_SEI
:
case
0x50
:
{
case
HEVC_NAL_SUFF_SEI
:
{
struct
nal
*
p_tmp
=
realloc
(
p_sei
,
sizeof
(
struct
nal
)
*
(
i_sei
+
1
));
struct
nal
*
p_tmp
=
realloc
(
p_sei
,
sizeof
(
struct
nal
)
*
(
i_sei
+
1
));
if
(
!
p_tmp
)
if
(
!
p_tmp
)
break
;
break
;
...
@@ -689,7 +690,7 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -689,7 +690,7 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
if
(
i_vps
)
if
(
i_vps
)
{
{
/* Write VPS without forcing array_completeness */
/* Write VPS without forcing array_completeness */
bo_add_8
(
hvcC
,
32
);
bo_add_8
(
hvcC
,
HEVC_NAL_VPS
);
bo_add_16be
(
hvcC
,
i_vps
);
bo_add_16be
(
hvcC
,
i_vps
);
for
(
size_t
i
=
0
;
i
<
i_vps
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
i_vps
;
i
++
)
{
p_nal
=
&
p_vps
[
i
];
p_nal
=
&
p_vps
[
i
];
...
@@ -700,7 +701,7 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -700,7 +701,7 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
if
(
i_sps
)
{
if
(
i_sps
)
{
/* Write SPS without forcing array_completeness */
/* Write SPS without forcing array_completeness */
bo_add_8
(
hvcC
,
33
);
bo_add_8
(
hvcC
,
HEVC_NAL_SPS
);
bo_add_16be
(
hvcC
,
i_sps
);
bo_add_16be
(
hvcC
,
i_sps
);
for
(
size_t
i
=
0
;
i
<
i_sps
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
i_sps
;
i
++
)
{
p_nal
=
&
p_sps
[
i
];
p_nal
=
&
p_sps
[
i
];
...
@@ -711,7 +712,7 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -711,7 +712,7 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
if
(
i_pps
)
{
if
(
i_pps
)
{
/* Write PPS without forcing array_completeness */
/* Write PPS without forcing array_completeness */
bo_add_8
(
hvcC
,
34
);
bo_add_8
(
hvcC
,
HEVC_NAL_PPS
);
bo_add_16be
(
hvcC
,
i_pps
);
bo_add_16be
(
hvcC
,
i_pps
);
for
(
size_t
i
=
0
;
i
<
i_pps
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
i_pps
;
i
++
)
{
p_nal
=
&
p_pps
[
i
];
p_nal
=
&
p_pps
[
i
];
...
@@ -722,7 +723,7 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
...
@@ -722,7 +723,7 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt)
if
(
i_sei
)
{
if
(
i_sei
)
{
/* Write SEI without forcing array_completeness */
/* Write SEI without forcing array_completeness */
bo_add_8
(
hvcC
,
39
);
bo_add_8
(
hvcC
,
HEVC_NAL_PREF_SEI
);
bo_add_16be
(
hvcC
,
i_sei
);
bo_add_16be
(
hvcC
,
i_sei
);
for
(
size_t
i
=
0
;
i
<
i_sei
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
i_sei
;
i
++
)
{
p_nal
=
&
p_sei
[
i
];
p_nal
=
&
p_sei
[
i
];
...
...
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