[FFmpeg-cvslog] avio: rename put_flush_packet -> avio_flush

Anton Khirnov git at videolan.org
Thu Mar 17 17:49:24 CET 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Mar 14 20:39:06 2011 +0100| [b7f2fdde74608d848f943377c40d3df804c5f955] | committer: Ronald S. Bultje

avio: rename put_flush_packet -> avio_flush

Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7f2fdde74608d848f943377c40d3df804c5f955
---

 libavformat/a64.c          |    2 +-
 libavformat/adtsenc.c      |    2 +-
 libavformat/aiffenc.c      |    4 ++--
 libavformat/amr.c          |    4 ++--
 libavformat/asfenc.c       |    8 ++++----
 libavformat/assenc.c       |    6 +++---
 libavformat/au.c           |    4 ++--
 libavformat/avienc.c       |    8 ++++----
 libavformat/avio.h         |    3 ++-
 libavformat/aviobuf.c      |   10 +++++++---
 libavformat/crcenc.c       |    2 +-
 libavformat/daud.c         |    2 +-
 libavformat/dvenc.c        |    2 +-
 libavformat/ffmenc.c       |    6 +++---
 libavformat/ffmetaenc.c    |    4 ++--
 libavformat/filmstripenc.c |    2 +-
 libavformat/flacenc.c      |    4 ++--
 libavformat/flvenc.c       |    2 +-
 libavformat/framecrcenc.c  |    2 +-
 libavformat/gif.c          |    6 +++---
 libavformat/gxfenc.c       |    8 ++++----
 libavformat/idroqenc.c     |    2 +-
 libavformat/img2.c         |    6 +++---
 libavformat/ivfenc.c       |    2 +-
 libavformat/libnut.c       |    4 ++--
 libavformat/matroskaenc.c  |    4 ++--
 libavformat/md5enc.c       |    2 +-
 libavformat/mmf.c          |    4 ++--
 libavformat/movenc.c       |    6 +++---
 libavformat/mp3enc.c       |    2 +-
 libavformat/mpegenc.c      |    6 +++---
 libavformat/mpegtsenc.c    |    6 +++---
 libavformat/mpjpeg.c       |    4 ++--
 libavformat/mxfenc.c       |    6 +++---
 libavformat/nutenc.c       |    4 ++--
 libavformat/oggenc.c       |    4 ++--
 libavformat/rawenc.c       |    2 +-
 libavformat/rmenc.c        |    8 ++++----
 libavformat/rsoenc.c       |    4 ++--
 libavformat/rtpdec.c       |    6 +++---
 libavformat/rtpenc.c       |    4 ++--
 libavformat/soxenc.c       |    4 ++--
 libavformat/spdifenc.c     |    2 +-
 libavformat/swfenc.c       |    6 +++---
 libavformat/vc1testenc.c   |    4 ++--
 libavformat/wav.c          |    8 ++++----
 libavformat/yuv4mpeg.c     |    2 +-
 47 files changed, 104 insertions(+), 99 deletions(-)

diff --git a/libavformat/a64.c b/libavformat/a64.c
index 17dcd96..3481ee7 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 1f5453d..a03e128 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 3e59362..6fc09ae 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 522d83e..e7a6758 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 3a06044..36b9472 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 9abe302..b367668 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 3ee0e45..9c674ac 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 3604a6c..3743abb 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 01ec9da..a8e98cb 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 2bbcf94..a0cb9a8 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 ec106b0..b5fed39 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 f852105..77cae8a 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 6d90024..0b80835 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 e648393..8071045 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 70940c0..596185b 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 d20b4ec..9bbc546 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 079e6dd..e7605f5 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 a1ed705..b1e0485 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 26ede95..dcdfac8 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 17effaa..f5f8147 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 44b5020..e6c44d6 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 9935b61..3e8f179 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 44c53fc..d7e014f 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 3913988..5fffaf7 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 1c13e29..5e58318 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 4c4f009..0c6e51c 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 065f7e8..10b3d59 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 a3e8b99..72dc954 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 e1fd79d..774cd3a 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 67ec826..88b1475 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 8c5c644..0c86df1 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 11a840f..3461a33 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 e98fb36..e6f6bcc 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 8e1cfc7..8cf5d93 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 05ec576..86701fa 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 39e36c8..fd88650 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 20ddfd5..a43d5f6 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 8a60886..4835cf4 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 fc7df76..58cfc79 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 b4b8ffc..438ceda 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 6c49d34..71ccdab 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 fb68d0b..214acdd 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 b4111f6..f6d4ec1 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 182cb65..052d720 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 65ac602..89ee9ef 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 d96b379..28ebe14 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 01366b0..a852568 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;
 }
 




More information about the ffmpeg-cvslog mailing list