break;
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
}
}
avio_write(pb, pkt->data, pkt->size);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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;
}
/* return to the end */
avio_seek(pb, end_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
{
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 */
return -1;
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
asf->packet_nb_payloads = 0;
asf->packet_timestamp_start = -1;
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;
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 */
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;
}
last=p;
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
{
avio_write(s->pb, pkt->data, pkt->size);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
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;
}
return -1;
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
avio_wb32(pb, (uint32_t)(file_size - 24));
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
avi->movi_list = ff_start_tag(pb, "LIST");
ffio_wfourcc(pb, "movi");
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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 */
if (size & 1)
avio_w8(pb, 0);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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;
#else
attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...);
#endif
+attribute_deprecated void put_flush_packet(AVIOContext *s);
/**
* @}
*/
attribute_deprecated char *url_fgets(AVIOContext *s, char *buf, int buf_size);
#endif
-void put_flush_packet(AVIOContext *s);
+void avio_flush(AVIOContext *s);
/**
}
}
-void put_flush_packet(AVIOContext *s)
+void avio_flush(AVIOContext *s)
{
flush_buffer(s);
s->must_flush = 0;
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)
int url_close_buf(AVIOContext *s)
{
- put_flush_packet(s);
+ avio_flush(s);
return s->buf_ptr - s->buffer;
}
#endif
padding = FF_INPUT_BUFFER_PADDING_SIZE;
}
- put_flush_packet(s);
+ avio_flush(s);
*pbuffer = d->buffer;
size = d->size;
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;
}
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;
}
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;
}
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 */
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;
if (ffm->packet_ptr > ffm->packet)
flush_packet(s);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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;
}
write_tags(s->pb, ch->metadata);
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
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;
}
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;
}
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);
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;
}
gif_image_write_header(pb, width, height, loop_count, NULL);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
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;
}
AVIOContext *pb = s->pb;
avio_w8(pb, 0x3b);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
gxf->packet_count = 3;
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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);
gxf->packet_count = 0;
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
};
avio_write(s->pb, header, 8);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
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{
}
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]);
}
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;
}
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;
}
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);
mkv->cur_audio_pkt.size = 0;
mkv->audio_buffer_size = 0;
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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;
}
buf[offset+1] = 0;
avio_write(s->pb, buf, strlen(buf));
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
}
#if CONFIG_MD5_MUXER
av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
avio_seek(pb, pos, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
}
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);
}
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
error:
}
- put_flush_packet(pb);
+ avio_flush(pb);
av_freep(&mov->tracks);
/* 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;
}
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++;
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
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;
service->pcr_packet_period,
ts->sdt_packet_period, ts->pat_packet_period);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
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)
}
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];
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;
}
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;
}
avio_seek(pb, pos, SEEK_SET);
}
- put_flush_packet(pb);
+ avio_flush(pb);
}
static const UID mxf_mpeg2_codec_uls[] = {
mxf->body_offset += 16+4+pkt->size + klv_fill_size(16+4+pkt->size);
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
}
}
- put_flush_packet(pb);
+ avio_flush(pb);
ff_audio_interleave_close(s);
if ((ret = write_headers(s, bc)) < 0)
return ret;
- put_flush_packet(bc);
+ avio_flush(bc);
//FIXME index
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);
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;
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;
}
if (rv10_write_header(s, 0, 0))
return AVERROR_INVALIDDATA;
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
} else {
avio_write(pb, buf, size);
}
- put_flush_packet(pb);
+ avio_flush(pb);
stream->nb_frames++;
av_free(buf1);
return 0;
avio_w8(pb, stream->nb_frames & 0xff);
avio_write(pb, buf, size);
- put_flush_packet(pb);
+ avio_flush(pb);
stream->nb_frames++;
return 0;
avio_wb32(pb, 0);
avio_wb32(pb, 0);
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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;
}
avio_wb16(pb, coded_file_size);
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
avio_w8(pb, 0);
}
- put_flush_packet(pb);
+ avio_flush(pb);
len = url_close_dyn_buf(pb, &buf);
if ((len > 0) && buf) {
int result;
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);
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);
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
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;
for ( ; comment_size > comment_len; comment_len++)
avio_w8(pb, 0);
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
avio_wb64(pb, num_samples);
avio_seek(pb, file_size, SEEK_SET);
- put_flush_packet(pb);
+ avio_flush(pb);
}
return 0;
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;
}
put_swf_end_tag(s);
}
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
put_swf_tag(s, TAG_SHOWFRAME);
put_swf_end_tag(s);
- put_flush_packet(s->pb);
+ avio_flush(s->pb);
return 0;
}
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) {
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;
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;
}
/* data header */
wav->data = ff_start_tag(pb, "data");
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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);
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 */
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;
ptr2 += picture->linesize[2];
}
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}