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
5dacc81c
Commit
5dacc81c
authored
Oct 16, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: remove special handler for atom gnre
parent
2b768994
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
41 deletions
+11
-41
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+1
-32
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+0
-7
modules/demux/mp4/meta.c
modules/demux/mp4/meta.c
+10
-2
No files found.
modules/demux/mp4/libmp4.c
View file @
5dacc81c
...
@@ -1774,37 +1774,6 @@ static int MP4_ReadBox_enda( stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -1774,37 +1774,6 @@ static int MP4_ReadBox_enda( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
MP4_READBOX_EXIT
(
1
);
}
}
static
int
MP4_ReadBox_gnre
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_Box_data_gnre_t
*
p_gnre
;
MP4_READBOX_ENTER
(
MP4_Box_data_gnre_t
);
p_gnre
=
p_box
->
data
.
p_gnre
;
uint32_t
i_data_len
;
uint32_t
i_data_tag
;
MP4_GET4BYTES
(
i_data_len
);
MP4_GETFOURCC
(
i_data_tag
);
if
(
i_data_len
<
10
||
i_data_tag
!=
ATOM_data
)
MP4_READBOX_EXIT
(
0
);
uint32_t
i_version
;
VLC_UNUSED
(
i_version
);
uint32_t
i_reserved
;
VLC_UNUSED
(
i_reserved
);
MP4_GET4BYTES
(
i_version
);
MP4_GET4BYTES
(
i_reserved
);
MP4_GET2BYTES
(
p_gnre
->
i_genre
);
if
(
p_gnre
->
i_genre
==
0
)
MP4_READBOX_EXIT
(
0
);
#ifdef MP4_VERBOSE
msg_Dbg
(
p_stream
,
"read box:
\"
gnre
\"
genre=%i"
,
p_gnre
->
i_genre
);
#endif
MP4_READBOX_EXIT
(
1
);
}
static
int
MP4_ReadBox_sample_soun
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
static
int
MP4_ReadBox_sample_soun
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
{
p_box
->
i_handler
=
ATOM_soun
;
p_box
->
i_handler
=
ATOM_soun
;
...
@@ -3743,7 +3712,7 @@ static const struct
...
@@ -3743,7 +3712,7 @@ static const struct
{
ATOM_0xa9wrt
,
MP4_ReadBox_0xa9xxx
,
MP4_FreeBox_0xa9xxx
,
ATOM_ilst
},
{
ATOM_0xa9wrt
,
MP4_ReadBox_0xa9xxx
,
MP4_FreeBox_0xa9xxx
,
ATOM_ilst
},
{
ATOM_chpl
,
MP4_ReadBox_chpl
,
MP4_FreeBox_chpl
,
ATOM_ilst
},
{
ATOM_chpl
,
MP4_ReadBox_chpl
,
MP4_FreeBox_chpl
,
ATOM_ilst
},
{
ATOM_covr
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_covr
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_gnre
,
MP4_ReadBox_
gnre
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_gnre
,
MP4_ReadBox_
Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_trkn
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_trkn
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
/* udta */
/* udta */
...
...
modules/demux/mp4/libmp4.h
View file @
5dacc81c
...
@@ -1189,12 +1189,6 @@ typedef struct
...
@@ -1189,12 +1189,6 @@ typedef struct
}
MP4_Box_data_enda_t
;
}
MP4_Box_data_enda_t
;
typedef
struct
{
uint16_t
i_genre
;
}
MP4_Box_data_gnre_t
;
typedef
struct
typedef
struct
{
{
uint32_t
i_entry_count
;
uint32_t
i_entry_count
;
...
@@ -1377,7 +1371,6 @@ typedef union MP4_Box_data_s
...
@@ -1377,7 +1371,6 @@ typedef union MP4_Box_data_s
MP4_Box_data_chan_t
*
p_chan
;
MP4_Box_data_chan_t
*
p_chan
;
MP4_Box_data_enda_t
*
p_enda
;
MP4_Box_data_enda_t
*
p_enda
;
MP4_Box_data_keys_t
*
p_keys
;
MP4_Box_data_keys_t
*
p_keys
;
MP4_Box_data_gnre_t
*
p_gnre
;
MP4_Box_data_iods_t
*
p_iods
;
MP4_Box_data_iods_t
*
p_iods
;
MP4_Box_data_pasp_t
*
p_pasp
;
MP4_Box_data_pasp_t
*
p_pasp
;
MP4_Box_data_trex_t
*
p_trex
;
MP4_Box_data_trex_t
*
p_trex
;
...
...
modules/demux/mp4/meta.c
View file @
5dacc81c
...
@@ -243,9 +243,17 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
...
@@ -243,9 +243,17 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
switch
(
p_box
->
i_type
)
switch
(
p_box
->
i_type
)
{
{
case
ATOM_gnre
:
case
ATOM_gnre
:
if
(
p_box
->
data
.
p_gnre
&&
p_box
->
data
.
p_gnre
->
i_genre
<=
NUM_GENRES
)
{
vlc_meta_SetGenre
(
p_meta
,
ppsz_genres
[
p_box
->
data
.
p_gnre
->
i_genre
-
1
]
);
const
MP4_Box_t
*
p_data
=
MP4_BoxGet
(
p_box
,
"data"
);
if
(
p_data
&&
BOXDATA
(
p_data
)
&&
BOXDATA
(
p_data
)
->
i_blob
>=
2
&&
BOXDATA
(
p_data
)
->
e_wellknowntype
==
DATA_WKT_RESERVED
)
{
const
uint16_t
i_genre
=
GetWBE
(
BOXDATA
(
p_data
)
->
p_blob
);
if
(
i_genre
&&
i_genre
<=
NUM_GENRES
)
vlc_meta_SetGenre
(
p_meta
,
ppsz_genres
[
i_genre
-
1
]
);
}
break
;
break
;
}
case
ATOM_trkn
:
case
ATOM_trkn
:
{
{
const
MP4_Box_t
*
p_data
=
MP4_BoxGet
(
p_box
,
"data"
);
const
MP4_Box_t
*
p_data
=
MP4_BoxGet
(
p_box
,
"data"
);
...
...
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