On Sat, Jun 14, 2014 at 3:06 PM, Nidhi Makhijani <[email protected]> wrote: > --- > libavformat/cdg.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/libavformat/cdg.c b/libavformat/cdg.c > index 974880a..f5a23aa 100644 > --- a/libavformat/cdg.c > +++ b/libavformat/cdg.c > @@ -42,9 +42,12 @@ static int read_header(AVFormatContext *s) > avpriv_set_pts_info(vst, 32, 1, 300); > > ret = avio_size(s->pb); > - if (ret > 0) > - vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300); > + if (ret < 0) { > + avformat_free_context(s);
same as previous emails > + return ret; > + } > > + vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300); > return 0; > } Looks ok otherwise. -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
