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
99bf5aff
Commit
99bf5aff
authored
May 24, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MP4: fix off-by-one genre metadata reading
parent
2f35df86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+2
-0
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+2
-2
No files found.
modules/demux/mp4/libmp4.c
View file @
99bf5aff
...
...
@@ -1172,6 +1172,8 @@ static int MP4_ReadBox_gnre( stream_t *p_stream, MP4_Box_t *p_box )
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
...
...
modules/demux/mp4/mp4.c
View file @
99bf5aff
...
...
@@ -905,8 +905,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
break
;
case
FOURCC_gnre
:
if
(
p_0xa9xxx
->
data
.
p_gnre
->
i_genre
<
NUM_GENRES
)
vlc_meta_SetGenre
(
p_meta
,
ppsz_genres
[
p_0xa9xxx
->
data
.
p_gnre
->
i_genre
]
);
if
(
p_0xa9xxx
->
data
.
p_gnre
->
i_genre
<
=
NUM_GENRES
)
vlc_meta_SetGenre
(
p_meta
,
ppsz_genres
[
p_0xa9xxx
->
data
.
p_gnre
->
i_genre
-
1
]
);
break
;
case
FOURCC_0xa9alb
:
/* Album */
...
...
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