[FFmpeg-cvslog] segment: fix FPE when segment_list_size is 0
Nicolas Noirbent
git at videolan.org
Fri Jan 13 16:09:00 CET 2012
ffmpeg | branch: master | Nicolas Noirbent <nicolas.noirbent at smartjog.com> | Fri Jan 13 09:58:15 2012 +0100| [62a22b2865f9afdadf0b6e272d002600803b17ec] | committer: Michael Niedermayer
segment: fix FPE when segment_list_size is 0
With the added benefit that allowing -segment_list_size 0 makes it
possible to keep all segment entries in the list file.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62a22b2865f9afdadf0b6e272d002600803b17ec
---
libavformat/segment.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 89ae62d..c75dd9c 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -206,7 +206,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
if (seg->list) {
avio_printf(seg->pb, "%s\n", oc->filename);
avio_flush(seg->pb);
- if (!(seg->number % seg->size)) {
+ if (seg->size && !(seg->number % seg->size)) {
avio_close(seg->pb);
if ((ret = avio_open2(&seg->pb, seg->list, AVIO_FLAG_WRITE,
&s->interrupt_callback, NULL)) < 0)
More information about the ffmpeg-cvslog
mailing list