microsoft / FFmpegInterop

This is a code sample to make it easier to use FFmpeg in Windows applications.
Apache License 2.0
1.29k stars 310 forks source link

Set codec parameters from FLAC stream info in FLACSampleProvider #274

Closed brbeec closed 4 years ago

brbeec commented 4 years ago

When FFmpeg is built without the FLAC decoder, some fields (e.g. channels, sample rate, bit rate) may not be set on the stream's codec parameters which can cause playback to fail.

This change updates the FLACSampleProvider to parse the FLAC stream info in the codec private data and set the stream's codec parameters accordingly.