Skip to content
Snippets Groups Projects
Commit d6635fa4 authored by Philippe Gorley's avatar Philippe Gorley
Browse files

media: fix timestamp woes

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
parent cd227556
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment