Commit c7e54628 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '95b7fa17'

* commit '95b7fa17':
  oggenc: Support flushing the muxer

Conflicts:
	libavformat/version.h
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a40c338a 95b7fa17
......@@ -554,7 +554,7 @@ static int ogg_write_header(AVFormatContext *s)
return 0;
}
static int ogg_write_packet(AVFormatContext *s, AVPacket *pkt)
static int ogg_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
{
AVStream *st = s->streams[pkt->stream_index];
OGGStreamContext *oggstream = st->priv_data;
......@@ -592,6 +592,23 @@ static int ogg_write_packet(AVFormatContext *s, AVPacket *pkt)
return 0;
}
static int ogg_write_packet(AVFormatContext *s, AVPacket *pkt)
{
int i;
if (pkt)
return ogg_write_packet_internal(s, pkt);
for (i = 0; i < s->nb_streams; i++) {
OGGStreamContext *oggstream = s->streams[i]->priv_data;
if (oggstream->page.segments_count)
ogg_buffer_page(s, oggstream);
}
ogg_write_pages(s, 2);
return 0;
}
static int ogg_write_trailer(AVFormatContext *s)
{
int i;
......@@ -647,7 +664,7 @@ AVOutputFormat ff_ogg_muxer = {
.write_header = ogg_write_header,
.write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer,
.flags = AVFMT_TS_NEGATIVE,
.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
.priv_class = &ogg_muxer_class,
};
#endif
......
......@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 42
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment