diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-17 12:01:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-17 12:01:35 +0200 |
commit | 96e6447d6233ac55f6dd4c50c9afefe99fefe773 (patch) | |
tree | 2e48a53cf7d93332ad999b046a72b1f91ee8a064 /libavformat/mux.c | |
parent | 22f79a2d605f3c3b36bb05e9609ff3a3dc27d1f9 (diff) | |
parent | 596e5d4783ca951258a7c580951fd161f1785ec1 (diff) | |
download | ffmpeg-96e6447d6233ac55f6dd4c50c9afefe99fefe773.tar.gz |
Merge commit '596e5d4783ca951258a7c580951fd161f1785ec1'
* commit '596e5d4783ca951258a7c580951fd161f1785ec1':
lavf: Add a flag to enable/disable per-packet flushing
Conflicts:
libavformat/avformat.h
libavformat/mux.c
libavformat/version.h
This adds a 2nd API to set per packet flushing
If the user application indicates through either a non default then this non default takes
precedence over the other still default value
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r-- | libavformat/mux.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index aa5d5edebc..eff7caab25 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -535,10 +535,13 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) did_split = av_packet_split_side_data(pkt); ret = s->oformat->write_packet(s, pkt); - if (s->flush_packets && s->pb && s->pb->error >= 0) + + if (s->flush_packets && s->pb && ret >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS) avio_flush(s->pb); + if (did_split) av_packet_merge_side_data(pkt); + return ret; } |