mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7'
* commit '15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7': mp3dec: export replaygain tags from ID3v2 Conflicts: Changelog Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
1034fbdf53
@ -5,6 +5,7 @@ version <next>:
|
||||
- shuffleplanes filter
|
||||
- subfile protocol
|
||||
- Phantom Cine demuxer
|
||||
- replaygain data export
|
||||
|
||||
|
||||
version 2.2:
|
||||
|
@ -221,7 +221,7 @@ OBJS-$(CONFIG_MOV_DEMUXER) += mov.o isom.o mov_chan.o
|
||||
OBJS-$(CONFIG_MOV_MUXER) += movenc.o isom.o avc.o hevc.o \
|
||||
movenchint.o mov_chan.o rtp.o
|
||||
OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o id3v2enc.o
|
||||
OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o
|
||||
OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o replaygain.o
|
||||
OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
|
||||
OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o img2.o
|
||||
OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o apetag.o img2.o
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include "internal.h"
|
||||
#include "id3v2.h"
|
||||
#include "id3v1.h"
|
||||
#include "replaygain.h"
|
||||
|
||||
#include "libavcodec/mpegaudiodecheader.h"
|
||||
|
||||
#define XING_FLAG_FRAMES 0x01
|
||||
@ -209,6 +211,7 @@ static int mp3_read_header(AVFormatContext *s)
|
||||
MP3DecContext *mp3 = s->priv_data;
|
||||
AVStream *st;
|
||||
int64_t off;
|
||||
int ret;
|
||||
|
||||
st = avformat_new_stream(s, NULL);
|
||||
if (!st)
|
||||
@ -234,6 +237,10 @@ static int mp3_read_header(AVFormatContext *s)
|
||||
if (mp3_parse_vbr_tags(s, st, off) < 0)
|
||||
avio_seek(s->pb, off, SEEK_SET);
|
||||
|
||||
ret = ff_replaygain_export(st, s->metadata);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* the parameters will be extracted from the compressed bitstream */
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user