Commit b7f2fdde authored by Anton Khirnov's avatar Anton Khirnov Committed by Ronald S. Bultje
Browse files

avio: rename put_flush_packet -> avio_flush


Signed-off-by: default avatarRonald S. Bultje <rsbultje@gmail.com>
parent 35f10235
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
/**
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment