lavc: do not leak the internal frame if opening the codec fails