avcodec: use av_frame_unref() to set frame defaults
This ensures that the code isnt duplicated and cant become out of sync
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>