mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-27 13:30:45 +00:00
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@gmx.at>
This commit is contained in:
parent
645569e19f
commit
62a22b2865
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user