Commit 1120fd78 authored by Stefano Sabatini's avatar Stefano Sabatini

lavf/segment: simplify logic and fix !=0 check on segment_end return value

A successfull return value can be > 0.
parent 67e507e1
......@@ -663,12 +663,10 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
(pkt->pts != AV_NOPTS_VALUE &&
av_compare_ts(pkt->pts, st->time_base,
end_pts-seg->time_delta, AV_TIME_BASE_Q) >= 0))) {
ret = segment_end(s, seg->individual_header_trailer, 0);
if (!ret)
ret = segment_start(s, seg->individual_header_trailer);
if ((ret = segment_end(s, seg->individual_header_trailer, 0)) < 0)
goto fail;
if (ret)
if ((ret = segment_start(s, seg->individual_header_trailer)) < 0)
goto fail;
oc = seg->avf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment