locked
Error 0x80040228 when using AVI Mux RRS feed

  • Question

  • Hi,

    I've searched the forums and can't see this question asked already...

    Basically I've created a filter graph that looks like this:

    File Source Async->My Custom Movie Parser->[audio and video pins]->AVI Mux->File Writer

    However when I run the graph I get an EC_ERRORABORT with error code 0x80040228 ("The graph could not change state. The sample start time is after the same end time.").

    The strange thing is, if I run the graph multiple times on the same source file I get the errors at different times. i.e. sometimes the output will be 4 minutes long before I hit this error, sometimes I'll get the error after just 3 minutes etc.

    I'd be very grateful if anyone could shed some light on what the problem could be, or how to debug it.

    Thanks
    Ben
    Thursday, February 11, 2010 3:46 PM

Answers

  • Your parser is generating bad time stamps.  Confirm that your time stamps only ever progress forwards, and that the stop time is always greater than the start time.
    www.chrisnet.net
    • Marked as answer by The March Hare Monday, February 22, 2010 1:17 AM
    Thursday, February 11, 2010 3:55 PM
  • just to clarify: the avi mux reports this error when it receives a sample whose start time is *before* the previously-received sample's end time. The error code it raises is a little unhelpful.

    Remember that avi files do not have a per-frame timestamp, only a fixed frame rate, so on receiving a frame, the mux has only two choices: place it in the next "slot", or insert "dropped" frame indicators in the next slot(s) and place it further on. If the frame is not timestamped, or has a timestamp that is in the past, it cannot do anything.

    G
     
    • Marked as answer by The March Hare Monday, February 22, 2010 1:18 AM
    Friday, February 12, 2010 9:53 AM

All replies

  • Your parser is generating bad time stamps.  Confirm that your time stamps only ever progress forwards, and that the stop time is always greater than the start time.
    www.chrisnet.net
    • Marked as answer by The March Hare Monday, February 22, 2010 1:17 AM
    Thursday, February 11, 2010 3:55 PM
  • Thanks Chris

    I'll investigate to see if I can work out why thats happening.

    Thanks
    Ben

    Thursday, February 11, 2010 4:08 PM
  • just to clarify: the avi mux reports this error when it receives a sample whose start time is *before* the previously-received sample's end time. The error code it raises is a little unhelpful.

    Remember that avi files do not have a per-frame timestamp, only a fixed frame rate, so on receiving a frame, the mux has only two choices: place it in the next "slot", or insert "dropped" frame indicators in the next slot(s) and place it further on. If the frame is not timestamped, or has a timestamp that is in the past, it cannot do anything.

    G
     
    • Marked as answer by The March Hare Monday, February 22, 2010 1:18 AM
    Friday, February 12, 2010 9:53 AM
  • Thanks Geraint

    Yours and Chris' explanations are very clear. Now I've just got to find out why our parser is doing something wrong with the timestamps.

    Thanks
    Ben
    Monday, February 15, 2010 10:31 AM