Browse Source

lavf: remove some flushing in write_packet muxers callbacks.

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

+ 0
- 1
libavformat/adtsenc.c View File

@@ -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;
}


+ 0
- 1
libavformat/amr.c View File

@@ -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 */


+ 0
- 3
libavformat/assenc.c View File

@@ -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;
}



+ 0
- 1
libavformat/avienc.c View File

@@ -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;
}



+ 0
- 1
libavformat/bit.c View File

@@ -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;
}


+ 0
- 1
libavformat/daud.c View File

@@ -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;
}



+ 0
- 1
libavformat/dvenc.c View File

@@ -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;
}


+ 0
- 1
libavformat/flacenc.c View File

@@ -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;
}



+ 0
- 1
libavformat/framecrcenc.c View File

@@ -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;
}



+ 0
- 1
libavformat/gif.c View File

@@ -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;
}



+ 0
- 2
libavformat/gxfenc.c View File

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

avio_flush(pb);

return 0;
}



+ 0
- 2
libavformat/icoenc.c View File

@@ -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;
}



+ 0
- 1
libavformat/ilbc.c View File

@@ -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;
}



+ 0
- 1
libavformat/ivfenc.c View File

@@ -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;
}


+ 0
- 1
libavformat/microdvdenc.c View File

@@ -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;
}



+ 0
- 1
libavformat/mkvtimestamp_v2.c View File

@@ -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;
}



+ 0
- 1
libavformat/mpjpeg.c View File

@@ -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;
}



+ 0
- 1
libavformat/rawenc.c View File

@@ -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;
}



+ 0
- 2
libavformat/rmenc.c View File

@@ -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;


+ 0
- 1
libavformat/smjpegenc.c View File

@@ -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;


+ 0
- 1
libavformat/spdifenc.c View File

@@ -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;
}



+ 0
- 1
libavformat/srtenc.c View File

@@ -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;
}


+ 0
- 2
libavformat/swfenc.c View File

@@ -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;
}



+ 0
- 1
libavformat/vc1testenc.c View File

@@ -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;


+ 0
- 1
libavformat/wtvenc.c View File

@@ -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;
}



+ 0
- 1
libavformat/wvenc.c View File

@@ -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;
}


+ 0
- 1
libavformat/yuv4mpeg.c View File

@@ -232,7 +232,6 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}

avio_flush(pb);
return 0;
}



Loading…
Cancel
Save