trav90
95a8f149db
Have specialized AVCodecContext initialization
...
A common initialization procedure is too restrictive, and we end up setting up audio configuration for video decoding and vice-versa.
2018-07-25 06:22:41 +08:00
trav90
4d1ef4248d
Let FFmpeg manage its own memory allocation
...
The API to override memory allocation was deprecated years ago and was completely removed in libavcodec 57.
2018-07-25 06:22:39 +08:00
trav90
6f315285f9
Fix VP9 decoding with recent version of libav.
...
Recent libav do not require a codec parser to decode VP9.
2018-07-25 06:21:46 +08:00
trav90
eb5ceada68
Parse raw data to identify single frames before decoding
...
A VP9 or VP9 packet may contains alternate frames. They need to be fed separately to the FFmpeg decoder.
2018-07-25 06:21:40 +08:00
trav90
bfafa7aaa9
Properly assign the decoded sample duration
...
We default to the previous logic if for some unlikely condition we couldn't find the frame's duration (using the last input frame's duration).
2018-07-25 06:21:14 +08:00
trav90
0a7eb3d9c0
Use LibAV/FFmpeg logic to detect invalid pts
...
The logic was extracted from LibAV cmdutils.c. FFmpeg provides an API for that (av_frame_get_best_effort_timestamp()) unfortunately this isn't provided by LibAV.
So copy the logic instead in order to keep compatibility with the two forks.
2018-07-25 06:21:09 +08:00
trav90
8b514b3576
Revert "Use demuxed dimensions to determine picture size and offset"
...
Causes build bustage. Also doesn't apply to H.264 video (which is currently our only use for FFmpeg).
2018-07-25 06:20:33 +08:00
trav90
c09f5b9f68
Use demuxed dimensions to determine picture size and offset
...
Don't assume it always has an offset of (0,0)
2018-07-25 06:20:23 +08:00
trav90
b20af88870
Work around bug in some versions of LibAV
...
When multi-threading decoding is enabled; the frames dimensions were incorrectly set with some versions of LibAV.
2018-07-25 01:31:40 +08:00
trav90
2c5c4a6d69
Fix pts calculations in older LibAV versions
2018-07-25 01:31:34 +08:00
trav90
538539f5c3
Move PlatformDecoderModule outside fmp4
2018-07-25 01:29:11 +08:00