1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

lavf: remove some flushing in write_packet muxers callbacks.

Since 4f112a8e3, this is not necessary anymore. Also, it allows to
actually disable the flushing.
This commit is contained in:
Clément Bœsch 2013-03-25 00:23:46 +01:00
parent bc1847addf
commit 8de9bb6e5e
27 changed files with 0 additions and 33 deletions

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

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

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

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

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

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

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

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

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

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

View File

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

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

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

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

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

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

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

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

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;

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;

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

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

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

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;

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

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

View File

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