Skip to content
Snippets Groups Projects
Commit 5c8467a0 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avformat/ivfenc: fix division by zero


Fixes Ticket 5115

Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent fe225b11
No related branches found
No related tags found
No related merge requests found
...@@ -72,8 +72,9 @@ static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -72,8 +72,9 @@ static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt)
static int ivf_write_trailer(AVFormatContext *s) static int ivf_write_trailer(AVFormatContext *s)
{ {
AVIOContext *pb = s->pb; AVIOContext *pb = s->pb;
if (pb->seekable) { IVFEncContext *ctx = s->priv_data;
IVFEncContext *ctx = s->priv_data;
if (pb->seekable && ctx->frame_cnt > 1) {
size_t end = avio_tell(pb); size_t end = avio_tell(pb);
avio_seek(pb, 24, SEEK_SET); avio_seek(pb, 24, SEEK_SET);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment