1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2026-05-16 08:38:24 +02:00

avformat/ivfenc: fix division by zero

Fixes Ticket 5115

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5c8467a07c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2016-01-08 23:01:30 +01:00
parent 36861557a7
commit d79b6dd9f9
+2 -1
View File
@@ -72,8 +72,9 @@ static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt)
static int ivf_write_trailer(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
if (pb->seekable) {
IVFEncContext *ctx = s->priv_data;
if (pb->seekable && ctx->frame_cnt > 1) {
size_t end = avio_tell(pb);
avio_seek(pb, 24, SEEK_SET);