[FFmpeg-trac] #6402(avformat:new): First frames incorrect after seeking on H264 file

FFmpeg trac at avcodec.org
Wed Jul 12 22:34:03 EEST 2017


#6402: First frames incorrect after seeking on H264 file
-------------------------------------+-------------------------------------
             Reporter:  jrummell     |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  mov          |               Blocked By:
  regression                         |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Changes (by dalecurtis):

 * cc: michael (added)


Comment:

 The issue seems to be caused by the fact that after a couple seeks the mov
 demuxer starts vending pts timestamps in order instead of accounting for
 decode reordering. E.g.:

 Good w/ and w/o sidx:
 1st Seek : 50000
 EnqueuePacket : pts: 4327323(48081.4), dts: 4324320(48.048 s)
 EnqueuePacket : pts: 4330326(48114.7), dts: 4327323(48.0814 s)
 EnqueuePacket : pts: 4339335(48214.8), dts: 4330326(48.1147 s)
 EnqueuePacket : pts: 4333329(48148.1), dts: 4333329(48.1481 s)
 EnqueuePacket : pts: 4336332(48181.5), dts: 4336332(48.1815 s)

 Good w/o sidx:
 2nd Seek : 15000
 EnqueuePacket : pts: 963963(10710.7), dts: 960960(10.6773 s)
 EnqueuePacket : pts: 972972(10810.8), dts: 963963(10.7107 s)
 EnqueuePacket : pts: 966966(10744.1), dts: 966966(10.7441 s)
 EnqueuePacket : pts: 969969(10777.4), dts: 969969(10.7774 s)
 EnqueuePacket : pts: 975975(10844.2), dts: 972972(10.8108 s)

 Bad w/ sidx:
 2nd Seek : 15000
 EnqueuePacket : pts: 963963(10710.7), dts: 960960(10.6773 s)
 EnqueuePacket : pts: 966966(10744.1), dts: 963963(10.7107 s)
 EnqueuePacket : pts: 969969(10777.4), dts: 966966(10.7441 s)
 EnqueuePacket : pts: 972972(10810.8), dts: 969969(10.7774 s)
 EnqueuePacket : pts: 975975(10844.2), dts: 972972(10.8108 s)

 Note how the second set of pts values are now in order and thus no longer
 correct. I'm still digging to see what's going on here; suggestions
 welcome since I'm unfamiliar with this code. cc:michael in case he has any
 hints since rodger seems unresponsive.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6402#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list