[libav-bugs] [Bug 381] New: Bad creation_date returned by avprobe for android-made video

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Fri Oct 19 03:42:44 CEST 2012


           Summary: Bad creation_date returned by avprobe for android-made
           Product: Libav
           Version: git HEAD
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: libavformat
        AssignedTo: bugzilla at libav.org
        ReportedBy: renaud.aubin at gmail.com

Time correction applied within mov_metadata_creation_time should not be applied
on a systematic basis. As a consequence, an avprobe cli call on a android-made
video returns 1946 as the year for creation_time although the video was
recorded in 2012.

Please, do not flame me down but there is a related ffmpeg issue ticket:

A workaround to the issue has been committed:
$ git show 23eeffcd48a15e73fb2649b712870b6d101c5471
commit 23eeffcd48a15e73fb2649b712870b6d101c5471
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sun Jul 1 21:41:06 2012 +0200

    mov: add workaround for incorrect 0 time point.

    Fixes Ticket1471

    Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

diff --git a/libavformat/mov.c b/libavformat/mov.c
index af5b126..faa8c65 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -780,7 +780,8 @@ static void mov_metadata_creation_time(AVDictionary
**metadata, time_t time)
     char buffer[32];
     if (time) {
         struct tm *ptm;
-        time -= 2082844800;  /* seconds between 1904-01-01 and Epoch */
+        if(time >= 2082844800)
+            time -= 2082844800;  /* seconds between 1904-01-01 and Epoch */
         ptm = gmtime(&time);
         if (!ptm) return;
         strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm);

As an end-user, I'm not fully competent to say if that workaround is a
sustainable fix to this issue or if this is only a workaround (hence temporary
by nature). I could either provide further analysis or help (somehow) if need

Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list