[FFmpeg-trac] #1740(avformat:new): avformat's av_write_trailer have bug.
FFmpeg
trac at avcodec.org
Mon Sep 17 06:39:24 CEST 2012
#1740: avformat's av_write_trailer have bug.
-------------------------------------+-------------------------------------
Reporter: kyh96403 | Type: defect
Status: new | Priority: important
Component: avformat | Version: git-
Keywords: | master
av_write_trailer error | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Lastest git version..
avformat/utils.c -> av_write_trailer have bug.
s->pb can be NULL.
{{{
if (!(s->oformat->flags & AVFMT_NOFILE))
avio_flush(s->pb);
}}}
So needed check s->pb is NULL or not.
{{{
if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
avio_flush(s->pb);
}}}
Or need check in avio_flush function.
{{{
void avio_flush(AVIOContext *s)
{
if (!s)
return 0;
flush_buffer(s);
s->must_flush = 0;
}
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1740>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list