aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-14 20:39:06 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-16 22:59:39 -0400
commitb7f2fdde74608d848f943377c40d3df804c5f955 (patch)
treeb2d0037a77a9b3610de310217c683016b19ec204
parent35f1023592b46e608a4de1566b12268e3e9e72f0 (diff)
downloadffmpeg-b7f2fdde74608d848f943377c40d3df804c5f955.tar.gz
avio: rename put_flush_packet -> avio_flush
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
-rw-r--r--libavformat/a64.c2
-rw-r--r--libavformat/adtsenc.c2
-rw-r--r--libavformat/aiffenc.c4
-rw-r--r--libavformat/amr.c4
-rw-r--r--libavformat/asfenc.c8
-rw-r--r--libavformat/assenc.c6
-rw-r--r--libavformat/au.c4
-rw-r--r--libavformat/avienc.c8
-rw-r--r--libavformat/avio.h3
-rw-r--r--libavformat/aviobuf.c10
-rw-r--r--libavformat/crcenc.c2
-rw-r--r--libavformat/daud.c2
-rw-r--r--libavformat/dvenc.c2
-rw-r--r--libavformat/ffmenc.c6
-rw-r--r--libavformat/ffmetaenc.c4
-rw-r--r--libavformat/filmstripenc.c2
-rw-r--r--libavformat/flacenc.c4
-rw-r--r--libavformat/flvenc.c2
-rw-r--r--libavformat/framecrcenc.c2
-rw-r--r--libavformat/gif.c6
-rw-r--r--libavformat/gxfenc.c8
-rw-r--r--libavformat/idroqenc.c2
-rw-r--r--libavformat/img2.c6
-rw-r--r--libavformat/ivfenc.c2
-rw-r--r--libavformat/libnut.c4
-rw-r--r--libavformat/matroskaenc.c4
-rw-r--r--libavformat/md5enc.c2
-rw-r--r--libavformat/mmf.c4
-rw-r--r--libavformat/movenc.c6
-rw-r--r--libavformat/mp3enc.c2
-rw-r--r--libavformat/mpegenc.c6
-rw-r--r--libavformat/mpegtsenc.c6
-rw-r--r--libavformat/mpjpeg.c4
-rw-r--r--libavformat/mxfenc.c6
-rw-r--r--libavformat/nutenc.c4
-rw-r--r--libavformat/oggenc.c4
-rw-r--r--libavformat/rawenc.c2
-rw-r--r--libavformat/rmenc.c8
-rw-r--r--libavformat/rsoenc.c4
-rw-r--r--libavformat/rtpdec.c6
-rw-r--r--libavformat/rtpenc.c4
-rw-r--r--libavformat/soxenc.c4
-rw-r--r--libavformat/spdifenc.c2
-rw-r--r--libavformat/swfenc.c6
-rw-r--r--libavformat/vc1testenc.c4
-rw-r--r--libavformat/wav.c8
-rw-r--r--libavformat/yuv4mpeg.c2
47 files changed, 104 insertions, 99 deletions
diff --git a/libavformat/a64.c b/libavformat/a64.c
index 17dcd96b5b..3481ee7d03 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -149,7 +149,7 @@ static int a64_write_packet(struct AVFormatContext *s, AVPacket *pkt)
break;
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
index 1f5453dbaf..a03e128d96 100644
--- a/libavformat/adtsenc.c
+++ b/libavformat/adtsenc.c
@@ -132,7 +132,7 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
avio_write(pb, pkt->data, pkt->size);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index 3e5936248c..6fc09aeb63 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -98,7 +98,7 @@ static int aiff_write_header(AVFormatContext *s)
av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
/* Data is starting here */
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -140,7 +140,7 @@ static int aiff_write_trailer(AVFormatContext *s)
/* return to the end */
avio_seek(pb, end_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
diff --git a/libavformat/amr.c b/libavformat/amr.c
index 522d83ea8b..e7a6758986 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -50,14 +50,14 @@ static int amr_write_header(AVFormatContext *s)
{
return -1;
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
static int amr_write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_write(s->pb, pkt->data, pkt->size);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
#endif /* CONFIG_AMR_MUXER */
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 3a06044036..36b9472018 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -574,7 +574,7 @@ static int asf_write_header(AVFormatContext *s)
return -1;
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
asf->packet_nb_payloads = 0;
asf->packet_timestamp_start = -1;
@@ -672,7 +672,7 @@ static void flush_packet(AVFormatContext *s)
avio_write(s->pb, asf->packet_buf, s->packet_size - packet_hdr_size);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
asf->nb_packets++;
asf->packet_nb_payloads = 0;
asf->packet_timestamp_start = -1;
@@ -864,7 +864,7 @@ static int asf_write_trailer(AVFormatContext *s)
if ((!asf->is_streamed) && (asf->nb_index_count != 0)) {
asf_write_index(s, asf->index_ptr, asf->maximum_packet, asf->nb_index_count);
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
if (asf->is_streamed || url_is_streamed(s->pb)) {
put_chunk(s, 0x4524, 0, 0); /* end of stream */
@@ -875,7 +875,7 @@ static int asf_write_trailer(AVFormatContext *s)
asf_write_header1(s, file_size, data_size - asf->data_offset);
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
av_free(asf->index_ptr);
return 0;
}
diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 9abe302744..b367668d2d 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -50,7 +50,7 @@ static int write_header(AVFormatContext *s)
last=p;
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -59,7 +59,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_write(s->pb, pkt->data, pkt->size);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -72,7 +72,7 @@ static int write_trailer(AVFormatContext *s)
avio_write(s->pb, avctx->extradata + ass->extra_index,
avctx->extradata_size - ass->extra_index);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/au.c b/libavformat/au.c
index 3ee0e45fb6..9c674ac6f6 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -74,7 +74,7 @@ static int au_write_header(AVFormatContext *s)
return -1;
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -99,7 +99,7 @@ static int au_write_trailer(AVFormatContext *s)
avio_wb32(pb, (uint32_t)(file_size - 24));
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 3604a6c399..3743abb8d7 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -393,7 +393,7 @@ static int avi_write_header(AVFormatContext *s)
avi->movi_list = ff_start_tag(pb, "LIST");
ffio_wfourcc(pb, "movi");
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -438,7 +438,7 @@ static int avi_write_ix(AVFormatContext *s)
avio_wl32(pb, ((uint32_t)ie->len & ~0x80000000) |
(ie->flags & 0x10 ? 0 : 0x80000000));
}
- put_flush_packet(pb);
+ avio_flush(pb);
pos = avio_tell(pb);
/* Updating one entry in the AVI OpenDML master index */
@@ -578,7 +578,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
if (size & 1)
avio_w8(pb, 0);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -624,7 +624,7 @@ static int avi_write_trailer(AVFormatContext *s)
avi_write_counters(s, avi->riff_id);
}
}
- put_flush_packet(pb);
+ avio_flush(pb);
for (i=0; i<s->nb_streams; i++) {
AVIStream *avist= s->streams[i]->priv_data;
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 01ec9daf69..a8e98cb529 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -435,6 +435,7 @@ attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) __att
#else
attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...);
#endif
+attribute_deprecated void put_flush_packet(AVIOContext *s);
/**
* @}
*/
@@ -529,7 +530,7 @@ int avio_printf(AVIOContext *s, const char *fmt, ...);
attribute_deprecated char *url_fgets(AVIOContext *s, char *buf, int buf_size);
#endif
-void put_flush_packet(AVIOContext *s);
+void avio_flush(AVIOContext *s);
/**
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 2bbcf940d9..a0cb9a8921 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -170,7 +170,7 @@ void avio_write(AVIOContext *s, const unsigned char *buf, int size)
}
}
-void put_flush_packet(AVIOContext *s)
+void avio_flush(AVIOContext *s)
{
flush_buffer(s);
s->must_flush = 0;
@@ -393,6 +393,10 @@ int url_fprintf(AVIOContext *s, const char *fmt, ...)
avio_write(s, buf, strlen(buf));
return ret;
}
+void put_flush_packet(AVIOContext *s)
+{
+ avio_flush(s);
+}
#endif
int avio_put_str(AVIOContext *s, const char *str)
@@ -1013,7 +1017,7 @@ int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags)
int url_close_buf(AVIOContext *s)
{
- put_flush_packet(s);
+ avio_flush(s);
return s->buf_ptr - s->buffer;
}
#endif
@@ -1141,7 +1145,7 @@ int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
padding = FF_INPUT_BUFFER_PADDING_SIZE;
}
- put_flush_packet(s);
+ avio_flush(s);
*pbuffer = d->buffer;
size = d->size;
diff --git a/libavformat/crcenc.c b/libavformat/crcenc.c
index ec106b0b38..b5fed3918d 100644
--- a/libavformat/crcenc.c
+++ b/libavformat/crcenc.c
@@ -50,7 +50,7 @@ static int crc_write_trailer(struct AVFormatContext *s)
snprintf(buf, sizeof(buf), "CRC=0x%08x\n", crc->crcval);
avio_write(s->pb, buf, strlen(buf));
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/daud.c b/libavformat/daud.c
index f852105a0c..77cae8a855 100644
--- a/libavformat/daud.c
+++ b/libavformat/daud.c
@@ -60,7 +60,7 @@ static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt)
avio_wb16(s->pb, pkt->size);
avio_wb16(s->pb, 0x8010); // unknown
avio_write(s->pb, pkt->data, pkt->size);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 6d90024eef..0b80835fae 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -382,7 +382,7 @@ static int dv_write_packet(struct AVFormatContext *s, AVPacket *pkt)
pkt->data, pkt->size, &frame);
if (fsize > 0) {
avio_write(s->pb, frame, fsize);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
}
return 0;
}
diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index e648393c89..8071045467 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -44,7 +44,7 @@ static void flush_packet(AVFormatContext *s)
h |= 0x8000;
avio_wb16(pb, h);
avio_write(pb, ffm->packet, ffm->packet_end - ffm->packet);
- put_flush_packet(pb);
+ avio_flush(pb);
/* prepare next packet */
ffm->frame_offset = 0; /* no key frame */
@@ -187,7 +187,7 @@ static int ffm_write_header(AVFormatContext *s)
while ((avio_tell(pb) % ffm->packet_size) != 0)
avio_w8(pb, 0);
- put_flush_packet(pb);
+ avio_flush(pb);
/* init packet mux */
ffm->packet_ptr = ffm->packet;
@@ -235,7 +235,7 @@ static int ffm_write_trailer(AVFormatContext *s)
if (ffm->packet_ptr > ffm->packet)
flush_packet(s);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
diff --git a/libavformat/ffmetaenc.c b/libavformat/ffmetaenc.c
index 70940c0e09..596185b70c 100644
--- a/libavformat/ffmetaenc.c
+++ b/libavformat/ffmetaenc.c
@@ -53,7 +53,7 @@ static int write_header(AVFormatContext *s)
avio_write(s->pb, ID_STRING, sizeof(ID_STRING) - 1);
avio_w8(s->pb, '1'); // version
avio_w8(s->pb, '\n');
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -79,7 +79,7 @@ static int write_trailer(AVFormatContext *s)
write_tags(s->pb, ch->metadata);
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/filmstripenc.c b/libavformat/filmstripenc.c
index d20b4ecd4c..9bbc546eaf 100644
--- a/libavformat/filmstripenc.c
+++ b/libavformat/filmstripenc.c
@@ -67,7 +67,7 @@ static int write_trailer(AVFormatContext *s)
avio_wb16(pb, 1/av_q2d(st->codec->time_base));
for (i = 0; i < 16; i++)
avio_w8(pb, 0x00); // reserved
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c
index 079e6dd713..e7605f5b23 100644
--- a/libavformat/flacenc.c
+++ b/libavformat/flacenc.c
@@ -104,7 +104,7 @@ static int flac_write_trailer(struct AVFormatContext *s)
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");
}
@@ -114,7 +114,7 @@ static int flac_write_trailer(struct AVFormatContext *s)
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;
}
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index a1ed705d7b..b1e048551f 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -430,7 +430,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wb32(pb,size+flags_size+11); // previous tag size
flv->duration = FFMAX(flv->duration, pkt->pts + flv->delay + pkt->duration);
- put_flush_packet(pb);
+ avio_flush(pb);
av_free(data);
diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index 26ede95495..dcdfac882a 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -29,7 +29,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
snprintf(buf, sizeof(buf), "%d, %"PRId64", %d, 0x%08x\n", pkt->stream_index, pkt->dts, pkt->size, crc);
avio_write(s->pb, buf, strlen(buf));
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/gif.c b/libavformat/gif.c
index 17effaaa46..f5f8147e4f 100644
--- a/libavformat/gif.c
+++ b/libavformat/gif.c
@@ -287,7 +287,7 @@ static int gif_write_header(AVFormatContext *s)
gif_image_write_header(pb, width, height, loop_count, NULL);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -322,7 +322,7 @@ static int gif_write_video(AVFormatContext *s,
gif_image_write_image(pb, 0, 0, enc->width, enc->height,
buf, enc->width * 3, PIX_FMT_RGB24);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -340,7 +340,7 @@ static int gif_write_trailer(AVFormatContext *s)
AVIOContext *pb = s->pb;
avio_w8(pb, 0x3b);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index 44b5020db0..e6c44d6fd9 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -753,7 +753,7 @@ static int gxf_write_header(AVFormatContext *s)
gxf->packet_count = 3;
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -781,12 +781,12 @@ static int gxf_write_trailer(AVFormatContext *s)
gxf_write_map_packet(s, 1);
gxf_write_flt_packet(s);
gxf_write_umf_packet(s);
- put_flush_packet(pb);
+ avio_flush(pb);
/* update duration in all map packets */
for (i = 1; i < gxf->map_offsets_nb; i++) {
avio_seek(pb, gxf->map_offsets[i], SEEK_SET);
gxf_write_map_packet(s, 1);
- put_flush_packet(pb);
+ avio_flush(pb);
}
avio_seek(pb, end, SEEK_SET);
@@ -895,7 +895,7 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
gxf->packet_count = 0;
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
diff --git a/libavformat/idroqenc.c b/libavformat/idroqenc.c
index 9935b61e1b..3e8f179846 100644
--- a/libavformat/idroqenc.c
+++ b/libavformat/idroqenc.c
@@ -30,7 +30,7 @@ static int roq_write_header(struct AVFormatContext *s)
};
avio_write(s->pb, header, 8);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 44c53fc18c..d7e014f132 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -372,8 +372,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
avio_write(pb[0], pkt->data , ysize);
avio_write(pb[1], pkt->data + ysize, (pkt->size - ysize)/2);
avio_write(pb[2], pkt->data + ysize +(pkt->size - ysize)/2, (pkt->size - ysize)/2);
- put_flush_packet(pb[1]);
- put_flush_packet(pb[2]);
+ avio_flush(pb[1]);
+ avio_flush(pb[2]);
avio_close(pb[1]);
avio_close(pb[2]);
}else{
@@ -402,7 +402,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
}
avio_write(pb[0], pkt->data, pkt->size);
}
- put_flush_packet(pb[0]);
+ avio_flush(pb[0]);
if (!img->is_pipe) {
avio_close(pb[0]);
}
diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c
index 3913988144..5fffaf7959 100644
--- a/libavformat/ivfenc.c
+++ b/libavformat/ivfenc.c
@@ -53,7 +53,7 @@ static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wl32(pb, pkt->size);
avio_wl64(pb, pkt->pts);
avio_write(pb, pkt->data, pkt->size);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index 1c13e295f7..5e5831892a 100644
--- a/libavformat/libnut.c
+++ b/libavformat/libnut.c
@@ -48,7 +48,7 @@ static const AVCodecTag nut_tags[] = {
static int av_write(void * h, size_t len, const uint8_t * buf) {
AVIOContext * bc = h;
avio_write(bc, buf, len);
- //put_flush_packet(bc);
+ //avio_flush(bc);
return len;
}
@@ -142,7 +142,7 @@ static int nut_write_trailer(AVFormatContext * avf) {
int i;
nut_muxer_uninit_reorder(priv->nut);
- put_flush_packet(bc);
+ avio_flush(bc);
for(i = 0; priv->s[i].type != -1; i++ ) av_freep(&priv->s[i].fourcc);
av_freep(&priv->s);
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 4c4f00958e..0c6e51c978 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -873,7 +873,7 @@ static int mkv_write_header(AVFormatContext *s)
mkv->cur_audio_pkt.size = 0;
mkv->audio_buffer_size = 0;
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -1172,7 +1172,7 @@ static int mkv_write_trailer(AVFormatContext *s)
end_ebml_master(pb, mkv->segment);
av_free(mkv->tracks);
av_destruct_packet(&mkv->cur_audio_pkt);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c
index 065f7e8dc9..10b3d59581 100644
--- a/libavformat/md5enc.c
+++ b/libavformat/md5enc.c
@@ -37,7 +37,7 @@ static void md5_finish(struct AVFormatContext *s, char *buf)
buf[offset+1] = 0;
avio_write(s->pb, buf, strlen(buf));
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
}
#if CONFIG_MD5_MUXER
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index a3e8b99cb4..72dc954132 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -102,7 +102,7 @@ static int mmf_write_header(AVFormatContext *s)
av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -160,7 +160,7 @@ static int mmf_write_trailer(AVFormatContext *s)
avio_seek(pb, pos, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
}
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e1fd79d6ec..774cd3a3b5 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2042,7 +2042,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
trk->sampleCount += samplesInChunk;
mov->mdat_size += size;
- put_flush_packet(pb);
+ avio_flush(pb);
if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams)
ff_mov_add_hinted_packet(s, pkt, trk->hint_track, trk->entry);
@@ -2227,7 +2227,7 @@ static int mov_write_header(AVFormatContext *s)
}
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
error:
@@ -2271,7 +2271,7 @@ static int mov_write_trailer(AVFormatContext *s)
}
- put_flush_packet(pb);
+ avio_flush(pb);
av_freep(&mov->tracks);
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 67ec826589..88b1475313 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -133,7 +133,7 @@ static int mp3_write_trailer(struct AVFormatContext *s)
/* write the id3v1 tag */
if (id3v1_create_tag(s, buf) > 0) {
avio_write(s->pb, buf, ID3v1_TAG_SIZE);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
}
return 0;
}
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 8c5c644f42..0c86df1eea 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -936,7 +936,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index,
for(i=0;i<zero_trail_bytes;i++)
avio_w8(ctx->pb, 0x00);
- put_flush_packet(ctx->pb);
+ avio_flush(ctx->pb);
s->packet_number++;
@@ -965,7 +965,7 @@ static void put_vcd_padding_sector(AVFormatContext *ctx)
s->vcd_padding_bytes_written += s->packet_size;
- put_flush_packet(ctx->pb);
+ avio_flush(ctx->pb);
/* increasing the packet number is correct. The SCR of the following packs
is calculated from the packet_number and it has to include the padding
@@ -1221,7 +1221,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
it as it is usually not needed by decoders and because it
complicates MPEG stream concatenation. */
//avio_wb32(ctx->pb, ISO_11172_END_CODE);
- //put_flush_packet(ctx->pb);
+ //avio_flush(ctx->pb);
for(i=0;i<ctx->nb_streams;i++) {
stream = ctx->streams[i]->priv_data;
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 11a840f8e4..3461a33a6a 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -579,7 +579,7 @@ static int mpegts_write_header(AVFormatContext *s)
service->pcr_packet_period,
ts->sdt_packet_period, ts->pat_packet_period);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
@@ -865,7 +865,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
payload_size -= len;
avio_write(s->pb, buf, TS_PACKET_SIZE);
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
}
static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
@@ -988,7 +988,7 @@ static int mpegts_write_end(AVFormatContext *s)
}
av_freep(&ts_st->adts);
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
for(i = 0; i < ts->nb_services; i++) {
service = ts->services[i];
diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c
index e98fb363e7..e6f6bcc5f6 100644
--- a/libavformat/mpjpeg.c
+++ b/libavformat/mpjpeg.c
@@ -30,7 +30,7 @@ static int mpjpeg_write_header(AVFormatContext *s)
snprintf(buf1, sizeof(buf1), "--%s\n", BOUNDARY_TAG);
avio_write(s->pb, buf1, strlen(buf1));
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -44,7 +44,7 @@ static int mpjpeg_write_packet(AVFormatContext *s, AVPacket *pkt)
snprintf(buf1, sizeof(buf1), "\n--%s\n", BOUNDARY_TAG);
avio_write(s->pb, buf1, strlen(buf1));
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 8e1cfc7b0d..8cf5d93257 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1272,7 +1272,7 @@ static void mxf_write_partition(AVFormatContext *s, int bodysid,
avio_seek(pb, pos, SEEK_SET);
}
- put_flush_packet(pb);
+ avio_flush(pb);
}
static const UID mxf_mpeg2_codec_uls[] = {
@@ -1731,7 +1731,7 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
mxf->body_offset += 16+4+pkt->size + klv_fill_size(16+4+pkt->size);
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -1795,7 +1795,7 @@ static int mxf_write_footer(AVFormatContext *s)
}
}
- put_flush_packet(pb);
+ avio_flush(pb);
ff_audio_interleave_close(s);
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 05ec576ad4..86701fa1aa 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -639,7 +639,7 @@ static int write_header(AVFormatContext *s){
if ((ret = write_headers(s, bc)) < 0)
return ret;
- put_flush_packet(bc);
+ avio_flush(bc);
//FIXME index
@@ -843,7 +843,7 @@ static int write_trailer(AVFormatContext *s){
while(nut->header_count<3)
write_headers(s, bc);
- put_flush_packet(bc);
+ avio_flush(bc);
ff_nut_free_sp(nut);
av_freep(&nut->stream);
av_freep(&nut->time_base);
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 39e36c8b6b..fd88650629 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -99,14 +99,14 @@ static int ogg_write_page(AVFormatContext *s, OGGPage *page, int extra_flags)
avio_write(pb, page->data, page->size);
ogg_update_checksum(s, pb, crc_offset);
- put_flush_packet(pb);
+ avio_flush(pb);
size = url_close_dyn_buf(pb, &buf);
if (size < 0)
return size;
avio_write(s->pb, buf, size);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
av_free(buf);
oggstream->page_count--;
return 0;
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 20ddfd5609..a43d5f61b2 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -26,7 +26,7 @@
int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_write(s->pb, pkt->data, pkt->size);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c
index 8a608861f5..4835cf4435 100644
--- a/libavformat/rmenc.c
+++ b/libavformat/rmenc.c
@@ -341,7 +341,7 @@ static int rm_write_header(AVFormatContext *s)
if (rv10_write_header(s, 0, 0))
return AVERROR_INVALIDDATA;
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -368,7 +368,7 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int
} else {
avio_write(pb, buf, size);
}
- put_flush_packet(pb);
+ avio_flush(pb);
stream->nb_frames++;
av_free(buf1);
return 0;
@@ -413,7 +413,7 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int
avio_w8(pb, stream->nb_frames & 0xff);
avio_write(pb, buf, size);
- put_flush_packet(pb);
+ avio_flush(pb);
stream->nb_frames++;
return 0;
@@ -454,7 +454,7 @@ static int rm_write_trailer(AVFormatContext *s)
avio_wb32(pb, 0);
avio_wb32(pb, 0);
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c
index fc7df76f76..58cfc798c9 100644
--- a/libavformat/rsoenc.c
+++ b/libavformat/rsoenc.c
@@ -60,7 +60,7 @@ static int rso_write_header(AVFormatContext *s)
avio_wb16(pb, enc->sample_rate);
avio_wb16(pb, 0x0000); /* play mode ? (0x0000 = don't loop) */
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -95,7 +95,7 @@ static int rso_write_trailer(AVFormatContext *s)
avio_wb16(pb, coded_file_size);
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index b4b8ffcd72..438ceda810 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -320,7 +320,7 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
avio_w8(pb, 0);
}
- put_flush_packet(pb);
+ avio_flush(pb);
len = url_close_dyn_buf(pb, &buf);
if ((len > 0) && buf) {
int result;
@@ -348,7 +348,7 @@ void rtp_send_punch_packets(URLContext* rtp_handle)
avio_wb32(pb, 0); /* Timestamp */
avio_wb32(pb, 0); /* SSRC */
- put_flush_packet(pb);
+ avio_flush(pb);
len = url_close_dyn_buf(pb, &buf);
if ((len > 0) && buf)
url_write(rtp_handle, buf, len);
@@ -363,7 +363,7 @@ void rtp_send_punch_packets(URLContext* rtp_handle)
avio_wb16(pb, 1); /* length in words - 1 */
avio_wb32(pb, 0); /* our own SSRC */
- put_flush_packet(pb);
+ avio_flush(pb);
len = url_close_dyn_buf(pb, &buf);
if ((len > 0) && buf)
url_write(rtp_handle, buf, len);
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 6c49d34c31..71ccdabf4a 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -206,7 +206,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time)
avio_wb32(s1->pb, rtp_ts);
avio_wb32(s1->pb, s->packet_count);
avio_wb32(s1->pb, s->octet_count);
- put_flush_packet(s1->pb);
+ avio_flush(s1->pb);
}
/* send an rtp packet. sequence number is incremented, but the caller
@@ -225,7 +225,7 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
avio_wb32(s1->pb, s->ssrc);
avio_write(s1->pb, buf1, len);
- put_flush_packet(s1->pb);
+ avio_flush(s1->pb);
s->seq++;
s->octet_count += len;
diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c
index fb68d0b908..214acdd59b 100644
--- a/libavformat/soxenc.c
+++ b/libavformat/soxenc.c
@@ -78,7 +78,7 @@ static int sox_write_header(AVFormatContext *s)
for ( ; comment_size > comment_len; comment_len++)
avio_w8(pb, 0);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -107,7 +107,7 @@ static int sox_write_trailer(AVFormatContext *s)
avio_wb64(pb, num_samples);
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index b4111f62b7..f6d4ec160e 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -531,7 +531,7 @@ static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_DEBUG, "type=%x len=%i pkt_offset=%i\n",
ctx->data_type, ctx->out_bytes, ctx->pkt_offset);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 182cb65660..052d7205e8 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -326,7 +326,7 @@ static int swf_write_header(AVFormatContext *s)
put_swf_end_tag(s);
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -432,7 +432,7 @@ static int swf_write_video(AVFormatContext *s,
put_swf_tag(s, TAG_SHOWFRAME);
put_swf_end_tag(s);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
@@ -489,7 +489,7 @@ static int swf_write_trailer(AVFormatContext *s)
put_swf_tag(s, TAG_END);
put_swf_end_tag(s);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
/* patch file size and number of frames if not streamed */
if (!url_is_streamed(s->pb) && video_enc) {
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index 65ac6029ac..89ee9ef78c 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -62,7 +62,7 @@ static int vc1test_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wl32(pb, pkt->size | ((pkt->flags & AV_PKT_FLAG_KEY) ? 0x80000000 : 0));
avio_wl32(pb, pkt->pts);
avio_write(pb, pkt->data, pkt->size);
- put_flush_packet(pb);
+ avio_flush(pb);
ctx->frames++;
return 0;
@@ -76,7 +76,7 @@ static int vc1test_write_trailer(AVFormatContext *s)
if (!url_is_streamed(s->pb)) {
avio_seek(pb, 0, SEEK_SET);
avio_wl24(pb, ctx->frames);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
}
diff --git a/libavformat/wav.c b/libavformat/wav.c
index d96b379b2c..28ebe140b6 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -71,7 +71,7 @@ static int wav_write_header(AVFormatContext *s)
/* data header */
wav->data = ff_start_tag(pb, "data");
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
@@ -96,7 +96,7 @@ static int wav_write_trailer(AVFormatContext *s)
WAVContext *wav = s->priv_data;
int64_t file_size;
- put_flush_packet(pb);
+ avio_flush(pb);
if (!url_is_streamed(s->pb)) {
ff_end_tag(pb, wav->data);
@@ -107,7 +107,7 @@ static int wav_write_trailer(AVFormatContext *s)
avio_wl32(pb, (uint32_t)(file_size - 8));
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
if(s->streams[0]->codec->codec_tag != 0x01) {
/* Update num_samps in fact chunk */
@@ -118,7 +118,7 @@ static int wav_write_trailer(AVFormatContext *s)
avio_seek(pb, wav->data-12, SEEK_SET);
avio_wl32(pb, number_of_samples);
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
}
return 0;
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index 01366b08b6..a852568a64 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -143,7 +143,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
ptr2 += picture->linesize[2];
}
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}