avoid double locking in h264_translate_reference_frames