leandromoreira / ffmpeg-libav-tutorial

FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more. Translations: πŸ‡ΊπŸ‡Έ πŸ‡¨πŸ‡³ πŸ‡°πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡»πŸ‡³ πŸ‡§πŸ‡·
https://github.com/leandromoreira/ffmpeg-libav-tutorial
BSD 3-Clause "New" or "Revised" License
9.82k stars 941 forks source link

Demo code bug fix. #60

Closed ldm0 closed 4 years ago

ldm0 commented 4 years ago
  1. pCodecParameters can be NULL. I think it should be pLocalCodecParameters.
  2. avformat_close_input is enough to free a context, calling avformat_free_context after it is just wrong:
    /**
    * Close an opened input AVFormatContext. Free it and all its contents
    * and set *s to NULL.
    */
    void avformat_close_input(AVFormatContext **s);