changeset 3038:db12cabbe337 libavformat

warn use if edit list is not starting at 0, a/v desync might occur
author bcoudurier
date Wed, 13 Feb 2008 10:58:16 +0000
parents 2cf7e3783091
children 1135ef610233
files mov.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Wed Feb 13 10:53:48 2008 +0000
+++ b/mov.c	Wed Feb 13 10:58:16 2008 +0000
@@ -1230,9 +1230,13 @@
     edit_count= sc->edit_count = get_be32(pb);     /* entries */
 
     for(i=0; i<edit_count; i++){
+        int time;
         get_be32(pb); /* Track duration */
-        get_be32(pb); /* Media time */
+        time = get_be32(pb); /* Media time */
         get_be32(pb); /* Media rate */
+        if (time != 0)
+            av_log(c->fc, AV_LOG_WARNING, "edit list not starting at 0, "
+                   "a/v desync might occur, patch welcome\n");
     }
     dprintf(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, sc->edit_count);
     return 0;