Replaced av_frame_alloc/av_frame_free with avcodec_alloc_frame/avcodec_free_frame.

These functions appear to do the exact same thing, but the avcodec_ ones are apparently older.