mirror of https://git.ffmpeg.org/ffmpeg.git
lavf/segment: simplify logic and fix !=0 check on segment_end return value
A successfull return value can be > 0.
This commit is contained in:
parent
67e507e10e
commit
1120fd7852
|
@ -663,12 +663,10 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
(pkt->pts != AV_NOPTS_VALUE &&
|
(pkt->pts != AV_NOPTS_VALUE &&
|
||||||
av_compare_ts(pkt->pts, st->time_base,
|
av_compare_ts(pkt->pts, st->time_base,
|
||||||
end_pts-seg->time_delta, AV_TIME_BASE_Q) >= 0))) {
|
end_pts-seg->time_delta, AV_TIME_BASE_Q) >= 0))) {
|
||||||
ret = segment_end(s, seg->individual_header_trailer, 0);
|
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)
|
||||||
ret = segment_start(s, seg->individual_header_trailer);
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
oc = seg->avf;
|
oc = seg->avf;
|
||||||
|
|
Loading…
Reference in New Issue