Revision fed5676f libavformat/mp3enc.c

View differences:

libavformat/mp3enc.c
23 23
#include "avformat.h"
24 24
#include "id3v1.h"
25 25
#include "id3v2.h"
26
#include "rawenc.h"
26 27
#include "libavutil/intreadwrite.h"
27 28
#include "libavutil/opt.h"
28 29

  
......
125 126
    return len + ID3v2_HEADER_SIZE;
126 127
}
127 128

  
128

  
129
static int mp3_write_packet(struct AVFormatContext *s, AVPacket *pkt)
130
{
131
    avio_write(s->pb, pkt->data, pkt->size);
132
    put_flush_packet(s->pb);
133
    return 0;
134
}
135

  
136 129
static int mp3_write_trailer(struct AVFormatContext *s)
137 130
{
138 131
    uint8_t buf[ID3v1_TAG_SIZE];
......
155 148
    CODEC_ID_MP2,
156 149
    CODEC_ID_NONE,
157 150
    NULL,
158
    mp3_write_packet,
151
    ff_raw_write_packet,
159 152
    mp3_write_trailer,
160 153
};
161 154
#endif
......
254 247
    CODEC_ID_MP3,
255 248
    CODEC_ID_NONE,
256 249
    mp3_write_header,
257
    mp3_write_packet,
250
    ff_raw_write_packet,
258 251
    mp3_write_trailer,
259 252
    AVFMT_NOTIMESTAMPS,
260 253
    .priv_class = &mp3_muxer_class,

Also available in: Unified diff