avcodec/decode: fix decoding when frames are allocated using AVHWAccel.alloc_frame()