[FFmpeg-cvslog] lavf/segment: slightly simplify fail logic in seg_write_packet()
Stefano Sabatini
git at videolan.org
Tue Jul 3 21:51:22 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sat Jan 14 00:19:59 2012 +0100| [a5af29336ab4d483f122215482b74a2f0043d125] | committer: Stefano Sabatini
lavf/segment: slightly simplify fail logic in seg_write_packet()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5af29336ab4d483f122215482b74a2f0043d125
---
libavformat/segment.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 17ef20a..caa9a89 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -213,12 +213,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_DEBUG, "Next segment starts at %d %"PRId64"\n",
pkt->stream_index, pkt->pts);
- ret = segment_end(s);
-
- if (!ret)
- ret = segment_start(s);
-
- if (ret)
+ if ((ret = segment_end(s)) < 0 || (ret = segment_start(s)) < 0)
goto fail;
}
More information about the ffmpeg-cvslog
mailing list