mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-12 10:15:22 +00:00
mp3enc: remove mp3_write_packet(), use ff_raw_write_packet() instead
The two functions are identical, no point in duplicating code here.
This commit is contained in:
parent
8312e3fc90
commit
fed5676ffe
@ -131,9 +131,9 @@ OBJS-$(CONFIG_MMF_MUXER) += mmf.o riff.o
|
|||||||
OBJS-$(CONFIG_MOV_DEMUXER) += mov.o riff.o isom.o
|
OBJS-$(CONFIG_MOV_DEMUXER) += mov.o riff.o isom.o
|
||||||
OBJS-$(CONFIG_MOV_MUXER) += movenc.o riff.o isom.o avc.o \
|
OBJS-$(CONFIG_MOV_MUXER) += movenc.o riff.o isom.o avc.o \
|
||||||
movenchint.o rtpenc_chain.o
|
movenchint.o rtpenc_chain.o
|
||||||
OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o
|
OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o
|
||||||
OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o
|
OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o
|
||||||
OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o
|
OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o
|
||||||
OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o
|
OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o
|
||||||
OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o
|
OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o
|
||||||
OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpegenc.o
|
OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpegenc.o
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
#include "id3v1.h"
|
#include "id3v1.h"
|
||||||
#include "id3v2.h"
|
#include "id3v2.h"
|
||||||
|
#include "rawenc.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
|
|
||||||
@ -125,14 +126,6 @@ static int id3v2_put_ttag(AVFormatContext *s, const char *str1, const char *str2
|
|||||||
return len + ID3v2_HEADER_SIZE;
|
return len + ID3v2_HEADER_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int mp3_write_packet(struct AVFormatContext *s, AVPacket *pkt)
|
|
||||||
{
|
|
||||||
avio_write(s->pb, pkt->data, pkt->size);
|
|
||||||
put_flush_packet(s->pb);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int mp3_write_trailer(struct AVFormatContext *s)
|
static int mp3_write_trailer(struct AVFormatContext *s)
|
||||||
{
|
{
|
||||||
uint8_t buf[ID3v1_TAG_SIZE];
|
uint8_t buf[ID3v1_TAG_SIZE];
|
||||||
@ -155,7 +148,7 @@ AVOutputFormat ff_mp2_muxer = {
|
|||||||
CODEC_ID_MP2,
|
CODEC_ID_MP2,
|
||||||
CODEC_ID_NONE,
|
CODEC_ID_NONE,
|
||||||
NULL,
|
NULL,
|
||||||
mp3_write_packet,
|
ff_raw_write_packet,
|
||||||
mp3_write_trailer,
|
mp3_write_trailer,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@ -254,7 +247,7 @@ AVOutputFormat ff_mp3_muxer = {
|
|||||||
CODEC_ID_MP3,
|
CODEC_ID_MP3,
|
||||||
CODEC_ID_NONE,
|
CODEC_ID_NONE,
|
||||||
mp3_write_header,
|
mp3_write_header,
|
||||||
mp3_write_packet,
|
ff_raw_write_packet,
|
||||||
mp3_write_trailer,
|
mp3_write_trailer,
|
||||||
AVFMT_NOTIMESTAMPS,
|
AVFMT_NOTIMESTAMPS,
|
||||||
.priv_class = &mp3_muxer_class,
|
.priv_class = &mp3_muxer_class,
|
||||||
|
Loading…
Reference in New Issue
Block a user