On Mon, 10 Aug 2015, Luca Barbato wrote:
On 09/08/15 21:45, Martin Storsjö wrote:
This fixes crashes with pathological cases when trying to write
a sidx index (via the -movflags faststart option, in combination
with fragmenting options), when no fragments actually have been
written. (This is possible if the empty_moov flag isn't used,
so that all actual packet data is written in the moov/mdat pair,
and no moof/mdat pairs have been written.)
In these pathological cases, no sidx should be written at all.
---
libavformat/movenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 158dfa8..a19c64b 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2751,6 +2751,8 @@ static int mov_write_sidx_tag(AVIOContext *pb,
}
} else {
entries = track->nb_frag_info;
+ if (entries <= 0)
+ return 0;
presentation_time = track->frag_info[0].time;
}
Ok, is stable affected?
Nope, this feature isn't in any stable release yet.
// Martin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel