[FFmpeg-cvslog] avformat/mov: Break out of inner loop early in mov_estimate_video_delay()

2018-07-16 Thread Michael Niedermayer
ffmpeg | branch: release/4.0 | Michael Niedermayer  | 
Wed Jul 11 02:17:58 2018 +0200| [6b65f46673d8efa3d9323307f000ba32c95f94d8] | 
committer: Michael Niedermayer

avformat/mov: Break out of inner loop early in mov_estimate_video_delay()

0.266 <- 0.299 sec (this is time ffmpeg so containing alot other things)

Sample for benchmark was: ffmpeg -f rawvideo -pix_fmt yuv420p -s 32x32 -i 
/dev/zero -t 24:00:00.00 out.mp4

Reviewed-by: Derek Buitenhuis 
Reviewed-by: Sasi Inguva 
Signed-off-by: Michael Niedermayer 
(cherry picked from commit aba13dc13e5233545bdd06f514e0addbb0155c69)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6b65f46673d8efa3d9323307f000ba32c95f94d8
---

 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index b01d533eb4..b0a50fbc54 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3330,6 +3330,8 @@ static void mov_estimate_video_delay(MOVContext *c, 
AVStream* st) {
 if (pts_buf[j] < pts_buf[r]) {
 FFSWAP(int64_t, pts_buf[j], pts_buf[r]);
 ++num_swaps;
+} else {
+break;
 }
 j = r;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/mov: Break out of inner loop early in mov_estimate_video_delay()

2018-07-12 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Jul 11 02:17:58 2018 +0200| [aba13dc13e5233545bdd06f514e0addbb0155c69] | 
committer: Michael Niedermayer

avformat/mov: Break out of inner loop early in mov_estimate_video_delay()

0.266 <- 0.299 sec (this is time ffmpeg so containing alot other things)

Sample for benchmark was: ffmpeg -f rawvideo -pix_fmt yuv420p -s 32x32 -i 
/dev/zero -t 24:00:00.00 out.mp4

Reviewed-by: Derek Buitenhuis 
Reviewed-by: Sasi Inguva 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aba13dc13e5233545bdd06f514e0addbb0155c69
---

 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 67b3e11eb9..8a91239243 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3332,6 +3332,8 @@ static void mov_estimate_video_delay(MOVContext *c, 
AVStream* st) {
 if (pts_buf[j] < pts_buf[r]) {
 FFSWAP(int64_t, pts_buf[j], pts_buf[r]);
 ++num_swaps;
+} else {
+break;
 }
 j = r;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog