Sample time stamps RRS feed

  • Question

  • I created a filter from dump example, I want to get frame duration from IMediaSample::GetTime(&aStart, &aStop),   the problem is that start time is NOT in order,  this is my log :
    :Receive Start 87040889 Stop 87040890 len 8187
    :Receive Start 87240889 Stop 87240890 len 8187
    :Receive Start 86240889 Stop 86240890 len 8187
    :Receive Start 86440889 Stop 86440890 len 8187
    :Receive Start 86640889 Stop 86640890 len 8187
    :Receive Start 86840889 Stop 86840890 len 8187
    :Receive Start 88240889 Stop 88240890 len 8187

    the video format is H.264 ,  why sample start time isn't in order ?  how to fix this problem ?

    Wednesday, December 16, 2009 3:13 PM


  • You are looking at compressed h264. Frames in H264 have references to pictures further ahead in the stream, and so these future reference frames need to be decoded first. So the compressed stream contains frames in decoding order, not presentation order. If you accept only uncompressed types (rgb, yuv) you will get timestamps in the right order, with both start and stop times set correctly.


    • Marked as answer by The March Hare Thursday, January 14, 2010 5:50 PM
    Wednesday, December 16, 2009 4:55 PM