[FFmpeg-devel] [PATCH] lavf/segment: simplify failing logic in seg_write_packet()
Michael Niedermayer
michaelni at gmx.at
Sat Nov 17 19:24:56 CET 2012
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121117/b1119dc8/attachment.asc>
More information about the ffmpeg-devel
mailing list