Not sure why you need to add the cast to (AVFormatContext**) ?