#include "libavcodec/flac.h"
#include "avformat.h"
#include "flacenc.h"
-#include "metadata.h"
#include "vorbiscomment.h"
#include "libavcodec/bytestream.h"
return 0;
}
-static int flac_write_block_comment(AVIOContext *pb, AVMetadata **m,
+static int flac_write_block_comment(AVIOContext *pb, AVDictionary **m,
int last_block, int bitexact)
{
const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT;
if (!ff_flac_is_extradata_valid(s->streams[0]->codec, &format, &streaminfo))
return -1;
- if (!url_is_streamed(pb)) {
+ if (pb->seekable) {
/* rewrite the STREAMINFO header block data */
file_size = avio_tell(pb);
avio_seek(pb, 8, SEEK_SET);
avio_write(pb, streaminfo, FLAC_STREAMINFO_SIZE);
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
} else {
av_log(s, AV_LOG_WARNING, "unable to rewrite FLAC header.\n");
}
static int flac_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{
avio_write(s->pb, pkt->data, pkt->size);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}