Browse Source

avformat/ivfenc: fix division by zero

Fixes Ticket 5115

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0
Michael Niedermayer 10 years ago
parent
commit
5c8467a07c
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavformat/ivfenc.c

+ 3
- 2
libavformat/ivfenc.c 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;
IVFEncContext *ctx = s->priv_data;

if (pb->seekable && ctx->frame_cnt > 1) {
size_t end = avio_tell(pb);

avio_seek(pb, 24, SEEK_SET);


Loading…
Cancel
Save