[FFmpeg-devel] [PATCH] lavf/segment: simplify failing logic in seg_write_packet()
Stefano Sabatini
stefasab at gmail.com
Sun Nov 18 12:37:18 CET 2012
On date Saturday 2012-11-17 19:24:56 +0100, Michael Niedermayer encoded:
> On Sat, Nov 17, 2012 at 05:43:35PM +0100, Stefano Sabatini wrote:
> > ---
> > libavformat/segment.c | 7 ++-----
> > 1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/libavformat/segment.c b/libavformat/segment.c
> > index 77c40da..1ad55ce 100644
> > --- a/libavformat/segment.c
> > +++ b/libavformat/segment.c
> > @@ -461,13 +461,10 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
> > pkt->stream_index, pkt->pts, pkt->pts * av_q2d(st->time_base));
> >
> > ret = segment_end(s, seg->individual_header_trailer);
> > -
> > - if (!ret)
> > - ret = segment_start(s, seg->individual_header_trailer);
> > -
> > - if (ret)
> > + if (ret < 0)
> > goto fail;
> >
> > + ret = segment_start(s, seg->individual_header_trailer);
> > oc = seg->avf;
> >
> > seg->start_time = (double)pkt->pts * av_q2d(st->time_base);
>
> thats not the same, the second is not checked anymore
Doh, patch dropped.
--
FFmpeg = Free & Furious Mortal Peaceful Eretic Guru
More information about the ffmpeg-devel
mailing list