Skip to content
  • Philippe Gorley's avatar
    media: fix timestamp woes · d6635fa4
    Philippe Gorley authored
    Stream time base is for AVPacket, while codec time base is for AVFrame.
    Good explanation found here: https://gist.github.com/yohhoy/50ea5fe868a2b3695e19
    
    Sets decoder framerate during stream setup.
    Scales decoder timestamps from container time base to codec time base.
    Substracts stream start time from timestamp in decoder.
    Fixes MediaStream to use AVCodecContext instead of AVStream.
    Encoders gets next timestamp using AVCodecContext instead of AVStream.
    
    Change-Id: I02620d825e3ff9488a4d1eb0f6eedc8dbd030df4
    d6635fa4