Use older FFmpeg API functions for AVFrame

Compatibility with older FFmpeg versions may be broken if the av_frame_*
functions are used instead of the avcodec_* equivalents.