[FFmpeg-devel] avformat/mov.c: Fix infinite loop when fragments seek

Submitted by Seokjin Hong on Dec. 7, 2018, 11:19 a.m.

Details

Message ID 20181207111930.12592-1-seokjin.hong.kr@gmail.com
State New
Headers show

Commit Message

Seokjin Hong Dec. 7, 2018, 11:19 a.m.
It will never escape this loop when moof has no sidx info

Signed-off-by: Seokjin Hong <seokjin.hong.kr@gmail.com>
---
 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ec57a05803..b7b69e2772 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1293,6 +1293,8 @@  static int search_frag_timestamp(MOVFragmentIndex *frag_index,
                 b = m;
             if (frag_time <= timestamp)
                 a = m;
+        } else {
+            return -1;
         }
     }
     return a;