Fixed a regression with avcodec due to 83f58a5076e659f63f47575c0c350b58367eaff0