lavf: remove some flushing in write_packet muxers callbacks.

Since 4f112a8e3, this is not necessary anymore. Also, it allows to
actually disable the flushing.
pull/14/head
Clément Bœsch 12 years ago
parent bc1847addf
commit 8de9bb6e5e
  1. 1
      libavformat/adtsenc.c
  2. 1
      libavformat/amr.c
  3. 3
      libavformat/assenc.c
  4. 1
      libavformat/avienc.c
  5. 1
      libavformat/bit.c
  6. 1
      libavformat/daud.c
  7. 1
      libavformat/dvenc.c
  8. 1
      libavformat/flacenc.c
  9. 1
      libavformat/framecrcenc.c
  10. 1
      libavformat/gif.c
  11. 2
      libavformat/gxfenc.c
  12. 2
      libavformat/icoenc.c
  13. 1
      libavformat/ilbc.c
  14. 1
      libavformat/ivfenc.c
  15. 1
      libavformat/microdvdenc.c
  16. 1
      libavformat/mkvtimestamp_v2.c
  17. 1
      libavformat/mpjpeg.c
  18. 1
      libavformat/rawenc.c
  19. 2
      libavformat/rmenc.c
  20. 1
      libavformat/smjpegenc.c
  21. 1
      libavformat/spdifenc.c
  22. 1
      libavformat/srtenc.c
  23. 2
      libavformat/swfenc.c
  24. 1
      libavformat/vc1testenc.c
  25. 1
      libavformat/wtvenc.c
  26. 1
      libavformat/wvenc.c
  27. 1
      libavformat/yuv4mpeg.c

@ -158,7 +158,6 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
avio_write(pb, pkt->data, pkt->size);
avio_flush(pb);
return 0;
}

@ -56,7 +56,6 @@ static int amr_write_header(AVFormatContext *s)
static int amr_write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_write(s->pb, pkt->data, pkt->size);
avio_flush(s->pb);
return 0;
}
#endif /* CONFIG_AMR_MUXER */

@ -58,9 +58,6 @@ static int write_header(AVFormatContext *s)
static int write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_write(s->pb, pkt->data, pkt->size);
avio_flush(s->pb);
return 0;
}

@ -587,7 +587,6 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
if (size & 1)
avio_w8(pb, 0);
avio_flush(pb);
return 0;
}

@ -139,7 +139,6 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
init_get_bits(&gb, pkt->data, 8*10);
for(i=0; i< 8 * 10; i++)
avio_wl16(pb, get_bits1(&gb) ? BIT_1 : BIT_0);
avio_flush(pb);
return 0;
}

@ -68,7 +68,6 @@ 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);
avio_flush(s->pb);
return 0;
}

@ -390,7 +390,6 @@ static int dv_write_packet(struct AVFormatContext *s, AVPacket *pkt)
pkt->data, pkt->size, &frame);
if (fsize > 0) {
avio_write(s->pb, frame, fsize);
avio_flush(s->pb);
}
return 0;
}

@ -122,7 +122,6 @@ 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);
avio_flush(s->pb);
return 0;
}

@ -46,7 +46,6 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
}
av_strlcatf(buf, sizeof(buf), "\n");
avio_write(s->pb, buf, strlen(buf));
avio_flush(s->pb);
return 0;
}

@ -329,7 +329,6 @@ static int gif_write_video(AVFormatContext *s, AVCodecContext *enc,
gif_image_write_image(pb, 0, 0, enc->width, enc->height,
buf, enc->width * 3, AV_PIX_FMT_RGB24);
avio_flush(s->pb);
return 0;
}

@ -950,8 +950,6 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
gxf->packet_count = 0;
}
avio_flush(pb);
return 0;
}

@ -151,8 +151,6 @@ static int ico_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_w8(pb, 0x00); // Write bitmask (opaque)
}
avio_flush(pb);
return 0;
}

@ -56,7 +56,6 @@ static int ilbc_write_header(AVFormatContext *s)
static int ilbc_write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_write(s->pb, pkt->data, pkt->size);
avio_flush(s->pb);
return 0;
}

@ -53,7 +53,6 @@ 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);
avio_flush(pb);
return 0;
}

@ -52,7 +52,6 @@ static int microdvd_write_packet(AVFormatContext *avf, AVPacket *pkt)
avio_printf(avf->pb, "{%"PRId64"}", pkt->pts + pkt->duration);
avio_write(avf->pb, pkt->data, pkt->size);
avio_write(avf->pb, "\n", 1);
avio_flush(avf->pb);
return 0;
}

@ -37,7 +37,6 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_WARNING, "More than one stream unsupported\n");
snprintf(buf, sizeof(buf), "%" PRId64 "\n", pkt->dts);
avio_write(s->pb, buf, strlen(buf));
avio_flush(s->pb);
return 0;
}

@ -47,7 +47,6 @@ static int mpjpeg_write_packet(AVFormatContext *s, AVPacket *pkt)
snprintf(buf1, sizeof(buf1), "\r\n--%s\r\n", BOUNDARY_TAG);
avio_write(s->pb, buf1, strlen(buf1));
avio_flush(s->pb);
return 0;
}

@ -26,7 +26,6 @@
int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_write(s->pb, pkt->data, pkt->size);
avio_flush(s->pb);
return 0;
}

@ -374,7 +374,6 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int
} else {
avio_write(pb, buf, size);
}
avio_flush(pb);
stream->nb_frames++;
av_free(buf1);
return 0;
@ -419,7 +418,6 @@ 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);
avio_flush(pb);
stream->nb_frames++;
return 0;

@ -109,7 +109,6 @@ static int smjpeg_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wb32(pb, pkt->pts);
avio_wb32(pb, pkt->size);
avio_write(pb, pkt->data, pkt->size);
avio_flush(pb);
smc->duration = FFMAX(smc->duration, pkt->pts + pkt->duration);
return 0;

@ -538,7 +538,6 @@ 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);
avio_flush(s->pb);
return 0;
}

@ -98,7 +98,6 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt)
avio_write(avf->pb, pkt->data, pkt->size);
if (write_ts)
avio_write(avf->pb, "\n\n", 2);
avio_flush(avf->pb);
srt->index++;
return 0;
}

@ -441,8 +441,6 @@ static int swf_write_video(AVFormatContext *s,
put_swf_tag(s, TAG_SHOWFRAME);
put_swf_end_tag(s);
avio_flush(s->pb);
return 0;
}

@ -63,7 +63,6 @@ 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);
avio_flush(pb);
ctx->frames++;
return 0;

@ -457,7 +457,6 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
write_pad(pb, WTV_PAD8(pkt->size) - pkt->size);
wctx->serial++;
avio_flush(pb);
return 0;
}

@ -110,7 +110,6 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
avio_write(pb, ptr, size - 24);
ptr += size - 24; left -= size - 24;
}
avio_flush(pb);
return 0;
}

@ -232,7 +232,6 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
avio_flush(pb);
return 0;
}

Loading…
Cancel
Save