Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
0048deb8
Commit
0048deb8
authored
Apr 04, 2014
by
Alessandro Ghedini
Committed by
Anton Khirnov
Apr 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oggparsevorbis: export replaygain tags from Vorbis comments
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
1d55f8d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
Makefile
libavformat/Makefile
+1
-0
oggparsevorbis.c
libavformat/oggparsevorbis.c
+8
-1
No files found.
libavformat/Makefile
View file @
0048deb8
...
...
@@ -221,6 +221,7 @@ OBJS-$(CONFIG_OGG_DEMUXER) += oggdec.o \
oggparsespeex.o
\
oggparsetheora.o
\
oggparsevorbis.o
\
replaygain.o
\
vorbiscomment.o
\
flac_picture.o
OBJS-$(CONFIG_OGG_MUXER)
+=
oggenc.o
\
...
...
libavformat/oggparsevorbis.c
View file @
0048deb8
...
...
@@ -36,6 +36,7 @@
#include "internal.h"
#include "oggdec.h"
#include "vorbiscomment.h"
#include "replaygain.h"
static
int
ogm_chapter
(
AVFormatContext
*
as
,
uint8_t
*
key
,
uint8_t
*
val
)
{
...
...
@@ -305,8 +306,14 @@ static int vorbis_header(AVFormatContext *s, int idx)
if
(
os
->
psize
>
8
&&
ff_vorbis_comment
(
s
,
&
st
->
metadata
,
os
->
buf
+
os
->
pstart
+
7
,
os
->
psize
-
8
)
>=
0
)
{
unsigned
new_len
;
int
ret
=
ff_replaygain_export
(
st
,
st
->
metadata
);
if
(
ret
<
0
)
return
ret
;
// drop all metadata we parsed and which is not required by libvorbis
unsigned
new_len
=
7
+
4
+
AV_RL32
(
priv
->
packet
[
1
]
+
7
)
+
4
+
1
;
new_len
=
7
+
4
+
AV_RL32
(
priv
->
packet
[
1
]
+
7
)
+
4
+
1
;
if
(
new_len
>=
16
&&
new_len
<
os
->
psize
)
{
AV_WL32
(
priv
->
packet
[
1
]
+
new_len
-
5
,
0
);
priv
->
packet
[
1
][
new_len
-
1
]
=
1
;
...
...
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