     stszBox = trakBox.find 'stsz'
     sampleSizes = stszBox.getSampleSizes sampleNumber, numSamplesInChunk
     chunkLength = stszBox.getSampleSize sampleNumber, numSamplesInChunk
+    cttsBox = trakBox.find 'ctts'
     samples = []
     sampleOffset = 0
+    mdhdBox = trakBox.find('mdia').find('mdhd')
     for sampleSize, i in sampleSizes
+      compositionTimeOffset = 0
+      if cttsBox?
+        compositionTimeOffset = cttsBox.getCompositionTimeOffset sampleNumber + i
       sampleTime = sttsBox.getDecodingTime sampleNumber + i
+      compositionTime = sampleTime.time + compositionTimeOffset
+      if mdhdBox.timescale isnt 90000
+        pts = Math.round(compositionTime * 90000 / mdhdBox.timescale)
+      else
+        pts = compositionTime
       samples.push {
-        pts: sampleTime.pts
+        pts: pts
         time: sampleTime.seconds
         data: @fileBuf[chunkOffset+sampleOffset...chunkOffset+sampleOffset+sampleSize]
       }

        sampleOffset: sampleOffset
    return

# '\xa9too' (actually '\xa9' expands to [0xc2, 0xa9])
# (copyright sign) + 'too'
class CTOOBox extends GenericDataBox

      else
        time += entry.sampleDelta * sampleNumber
        break
    return {
      time: time
      seconds: time / mdhdBox.timescale
    }

  getDetails: (detailLevel) ->
