Changed "av_freep" according to examples. Still segfaults.