Commit Graph

14 Commits

Author SHA1 Message Date
trav90 c864fb268e Don't assume AVFrame has a constant size
An AVFrame has a different size between FFmpeg 0.10 and LibAV 0.8 though both have the same version number.
2018-07-25 06:24:25 +08:00
trav90 1258bc5bfe Add support for libavcodec 57
At this point only the original FFmpeg project is supported.
2018-07-25 06:24:04 +08:00
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 9d1938950d Don't rely on library name to determine version of libavcodec
Also use portable way to dynamically open libraries.
2018-07-25 06:22:35 +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 0f0d8c765b Have FFMpegDecoderModule properly return if a codec is supported
Our current PlatformDecoderModule::SupportsMimeType implementations only check for support by performing a lookup on the mimetype as a strink and always assume that the underlying decoder is usable and is working.

This is an invalid assumption; especially with the FFMpeg decoder that may not be compiled with some particular codec support (like if it was compiled with --disable-nonfree).
2018-07-25 06:21:06 +08:00
trav90 cdd9c93bb6 Delete codec context upon initialization failure 2018-07-25 06:20:21 +08:00
trav90 c6fce7f64d Always request 16 bits audio for libavcodec 53 2018-07-25 06:20:19 +08:00
trav90 9992910055 Support YUV420J pixel format
YUV420J is 12bpp YUV420P.
2018-07-25 06:20:10 +08:00
trav90 6b219443fd Remove dependency on libavformat
When searching for ffmpeg or libav we currently look for libavformat and search for a specific version. We have no use for the libavformat library as we only use libavcodec and (indirectly) libavutil. The version numbering in libavformat is also completely irrelevant for our use.

With this commit, we will look for libavcodec instead.
2018-07-25 06:20:04 +08:00
trav90 45c02334a5 Fix FFmpeg shutdown crash should decoder not be initialised 2018-07-25 06:20:02 +08:00
trav90 c945261c27 Prevent potential null deref when flushing FFmpeg decoder 2018-07-25 01:31:43 +08:00
trav90 52c9efbf75 Request S16 audio for libav 0.8 and earlier 2018-07-25 01:31:42 +08:00
trav90 538539f5c3 Move PlatformDecoderModule outside fmp4 2018-07-25 01:29:11 +08:00