[FFmpeg-trac] #1817(avformat:open): create_time contains wrong value for Canon EOS 550D movies

FFmpeg trac at avcodec.org
Tue Oct 16 16:10:32 CEST 2012


#1817: create_time contains wrong value for Canon EOS 550D movies
-------------------------------------+-------------------------------------
             Reporter:  pwes         |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  important    |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  mov          |               Blocked By:
  creation_time regression           |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by pwes):

 OK, I found the direct reason for misbehavior (thanks for notifying 32-bit
 specificity).

 The problem lies in the condition
 {{{
 if(time >= 2082844800)
 }}}

 never evaluating to true for `time` values 1904-01-01-based, because they
 are greater than 0x80000000 and are treated as signed in this context,
 resulting in negative value for `time`.

 The solution (or rather a workaround?) is to force `unsigned long` context
 {{{
 if(time >= 2082844800UL)
 }}}

 after which the bug doesn't occur.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1817#comment:7>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list